Showing posts with label quintuple. Show all posts
Showing posts with label quintuple. Show all posts

Thursday, 15 October 2026

Double-Safe and Triple-Safe Primes

A safe prime \(p\) is one such that \( \dfrac{p-1}{2} \) is also prime.
The first example of such a prime is 5 because \( \dfrac{5-1}{2} =2\) which is prime.
However, we can generalise this notion and speak of a \(k\)-safe prime \(p\) where $$ \frac{p-(2^i-1)}{2^i} \text{ is prime for } i=0,1, 2, \dots  k$$Let's look at the various values of \(k\) as applied to a prime \(p\) :

  • \(i=0\) just gives the originating prime \(p\)
  • \(i=1\) means the prime is safe and  \( \dfrac{p-1}{2} \) is prime
  • \(i=2\) means the prime is 2-safe or double-safe and  \( \dfrac{p-3}{4} \) is prime
  • \(i=3\) means the prime is 3-safe or triple-safe and  \( \dfrac{p-7}{8} \) is prime

Let's look at a specific prime, 28319, that is known be a triple safe prime:

  • \(28319\) is prime
  • \(28319 \rightarrow \dfrac{28319-1}{2}  =14159\) which is thus a safe prime
  • \(28319 \rightarrow \dfrac{28319-3}{4} =7079\) which is thus a double-safe prime
  • \(28319 \rightarrow \dfrac{28319-7}{8}  =3539\) which is thus a triple-safe prime
  • \(28319 \rightarrow  \dfrac{28319-15}{16} =1769= 29 \times 61 \) which is not prime
  • These triple-safe primes form OEIS A157358 and the initial members are: 

    23, 47, 719, 1439, 2879, 4079, 9839, 11279, 21599, 28319, 51599, 84719, 92399, 95279, 96959, 137279, 157679, 159119, 178799, 209519, 219839, 243119, 349199, 429119, 430799, 441839, 462719, 481199, 491279, 507359, 533999, 571199, 597599

    As can be seen, 28319 is the last triple-safe prime that I'll see in my lifetime. The double-safe primes form OEIS A066179 and these are more frequent in the range up to 40000:

    11, 23, 47, 167, 359, 719, 1439, 2039, 2879, 4079, 4127, 4919, 5639, 5807, 5927, 6047, 7247, 7559, 7607, 7727, 9839, 10799, 11279, 13799, 13967, 14159, 15287, 15647, 20327, 21599, 21767, 23399, 24407, 24527, 25799, 28319, 28607, 29399, 31607, 35879, 36887

    What about quadruple, quintuple-safe primes and beyond. Up to 40000, there are only three quadruple-safe primes and these are 47, 1439 and 2879. Of these, only 2879 is a quintuple-safe prime (permalink). There is no sextuple-safe prime until we reach 71850239! Up to a billion, there are no septuple-safe primes.

    Wednesday, 14 June 2023

    Kaprekar Quintuples

    I've written about Kaprekar before in posts titled Kaprekar's Routine on 16th July 2021 and Birth Year Magic on 3rd June 2020. Today, the number associated with my diurnal age (27100) brought me into contact with him again via his Kaprekar Quintuples. These are numbers \(n\) with the property that the digits of \(n^5\) taken \(d\) at a time sum to \(n\) (where \(d\) is the number of digits in \(n\)).

    Let's illustrate this in the case of 27100 where we take groups of five digits beginning from the rightmost digit, leaving three digits remaining on the left:$$27100^5 = 14616603103510000000000\\ 146+16603+10351+00000+00000 = 27100 $$Let's try with another number, 7776, that has four digits instead of five. Here we take groups of four digits beginning at the rightmost digit with no digits left over:$$7776^5 = 28430288029929701376 \\2843+0288+0299+2970+1376 = 7776$$The members of the sequence are (permalink showing members up to 100,000):

    1, 10, 1000, 7776, 27100, 73440, 95120, 500499, 505791, 540539, 598697, 665335, 697598, 732347, 7607610, 37944478, 46945205, 54995500, 55216205, 56607166, 58106906, 63136413, 66595563, 68167738, 68807564, 69188525, 70667477, 72197730, 73197730, 74145807

    These numbers constitute OEIS A171500. These numbers can also be called order-5 Kaprekar numbers and this site shows the initial members. See Table 1.


    Table 1

    The same site also shows order-4 Kaprekar numbers or Kaprekar quadruples where numbers are raised to the fourth power. See Table 2.


    Table 2

    Order-3 and order-2 Kaprekar are also shown on this site and could be referred to as Kaprekar triplets/triples and Kaprekar couplets/pairs.