login
A396234
Smaller term of pairs of consecutive primes of the form p, p+6 where both primes eventually reach a value of 1 under iteration of the sums of the squares of their digits and the first iteration of both terms are also prime.
1
2333, 3323, 12143, 21143, 21341, 23893, 30097, 32303, 33023, 123401, 213223, 221233, 230303, 238093, 245783, 254873, 278543, 280933, 289033, 300233, 302411, 302983, 304211, 312401, 323003, 329083, 336397, 340121, 342101, 344963, 396443, 398023, 401231, 413201, 475283, 478253
OFFSET
1,1
COMMENTS
Equivalently, consecutive happy sexy primes where both primes produce a second prime.
Conjecture: this sequence has an infinite number of terms.
All terms of this sequence go through a minimum of three iterations before going to the value of 1.
REFERENCES
Liz Strachan, Numbers Are Forever, Constable, London, 2014, p. 92.
EXAMPLE
2333 is a term because it is the smaller of a consecutive sexy prime pair (2333, 2339) where 2333 is a happy prime because 2333 --> 2^2 + 3^2 + 3^2 + 3^2 = 4 + 9 + 9 + 9 = 31 --> 3^2 + 1^2 = 10 --> 1^2 = 1 --> 1^2 = 1, and the first iteration produces the prime number 31. The larger term, p = 2339 is also a happy prime because 2339 --> 2^2 + 3^2 + 3^2 + 9^2 = 103 --> 1^2 + 0^2 + 3^2 = 10 --> 1^2 = 1 --> 1^2 = 1, and the first iteration produces the prime number 103.
Both the smaller and larger term of consecutive sexy prime pairs must be happy primes and both must produce another prime on their first iteration for the smaller term to be a term of this sequence.
The happy sexy prime p=3301 is not a term because the next term (p+6) is not a happy prime.
The smallest terms of prime triples are not terms because the sexy prime pairs are not consecutive primes.
MATHEMATICA
s[n_] := Total[IntegerDigits[n]^2]; happyQ[n_] := NestWhile[s, n, UnsameQ, All] == 1; seq[lim_] := Module[{ps = Prime[Range[lim]], ind}, ind = Position[ps, _?(PrimeQ[s[#]] && happyQ[#] &), 1] // Flatten; ps[[Intersection[-1 + ind[[1 + Position[Differences[ind], 1] // Flatten]], Position[Differences[ps], 6] // Flatten]]]]; seq[50000] (* Amiram Eldar, May 22 2026 *)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Harry E. Neel, May 19 2026
STATUS
approved