A276255 Sum of first n Honaker primes.
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
Examples
The first Honaker prime is 131, so a(1) = 131. The second Honaker prime is 263, so a(2) = 131 + 263 = 394.
Links
- K. D. Bajpai, Table of n, a(n) for n = 1..7300
Crossrefs
Cf. A033548.
Programs
-
Mathematica
Accumulate[Select[Prime@Range@3000, Plus @@ IntegerDigits@# == Plus @@ IntegerDigits@PrimePi@# &]] (* Bajpai *) DeleteDuplicates[Accumulate[Table[Prime[n] * Boole[Plus@@IntegerDigits[n] == Plus@@IntegerDigits[Prime[n]]], {n, 1000}]]] (* Alonso del Arte, Aug 25 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
-
Perl
use ntheory ":all"; my($s,$i)=(0,0); forprimes { say $s+=$ if sumdigits($) == sumdigits(++$i) } 1e7; # Dana Jacobsen, Aug 29 2016
Comments