OFFSET
1,1
LINKS
K. D. Bajpai, Table of n, a(n) for n = 1..10000
EXAMPLE
263 is a Honaker prime: the number of primes up to 263 is 56 and 2 + 6 + 3 = 11 = 5 + 6. 263 is also a Happy number: iterating the sum of squares of digits terminates in 1, i.e., 263 -> 4 + 36 + 9 = 49 -> 16 + 81 = 97 -> 81 + 49 = 130 -> 1 + 9 + 0 = 10 -> 1 + 0 = 1. Thus 263 is a Happy Honaker prime.
MATHEMATICA
Select[Prime[Range[20000]], FixedPoint[Total[IntegerDigits[#]^2] &, #, 10] == 1 && Plus @@ IntegerDigits@# == Plus @@ IntegerDigits@PrimePi@# &]
CROSSREFS
KEYWORD
nonn,base
AUTHOR
K. D. Bajpai, Apr 07 2021
STATUS
approved