login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A276255
Sum of first n Honaker primes.
1
131, 394, 851, 1890, 2939, 4030, 5331, 6692, 8125, 9696, 11609, 13542, 15683, 17904, 20177, 22618, 25209, 27872, 30579, 33298, 36027, 38830, 41897, 45034, 48263, 51696, 55255, 58886, 62977, 67130, 71487, 75884, 80587, 85310, 90213, 95222, 100729, 106430, 112141
OFFSET
1,1
COMMENTS
A Honaker prime is a prime number prime(k) such that k and prime(k) have the same sum of digits.
LINKS
EXAMPLE
The first Honaker prime is 131, so a(1) = 131.
The second Honaker prime is 263, so a(2) = 131 + 263 = 394.
MATHEMATICA
Accumulate[Select[Prime@Range@3000, Plus @@ IntegerDigits@# == Plus @@ IntegerDigits@PrimePi@# &]] (* Bajpai *)
Accumulate[Table[Prime[n] * Boole[Plus@@IntegerDigits[n] == IntegerDigits[Prime[n]]], {n, 1000}] (* Alonso del Arte, Aug 25 2016 *)
PROG
(Perl) use ntheory ":all"; my($s, $i)=(0, 0); forprimes { say $s+=$_ if sumdigits($_) == sumdigits(++$i) } 1e7; # Dana Jacobsen, Aug 29 2016
(PARI) first(n)=my(v=vector(n), i, k, s); forprime(p=2, , if(sumdigits(k++)==sumdigits(p), v[i++] = s+=p); if(i==n, return(v))) \\ Charles R Greathouse IV, Aug 29 2016
CROSSREFS
Cf. A033548.
Sequence in context: A242846 A142129 A068680 * A142555 A118507 A105837
KEYWORD
nonn,base
AUTHOR
K. D. Bajpai, Aug 25 2016
STATUS
approved