login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A033548 Honaker primes: primes P(k) such that sum of digits of P(k) equals sum of digits of k. 31
131, 263, 457, 1039, 1049, 1091, 1301, 1361, 1433, 1571, 1913, 1933, 2141, 2221, 2273, 2441, 2591, 2663, 2707, 2719, 2729, 2803, 3067, 3137, 3229, 3433, 3559, 3631, 4091, 4153, 4357, 4397, 4703, 4723, 4903, 5009, 5507, 5701, 5711, 5741, 5801, 5843 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
A090431(A049084(a(n))) = 0.
REFERENCES
Proposed by G. L. Honaker, Jr.
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..10000 (first 1000 terms from T. D. Noe)
FORMULA
a(n) = A000040(A033549(n)). - R. J. Mathar, Jul 07 2021
EXAMPLE
131 is the 32nd prime and sum of digits of both is 5.
MAPLE
read("transforms") :
isA033548 := proc(n)
if isprime(n) and digsum(n) = digsum(numtheory[pi](n)) then
true ;
else
false;
end if;
end proc:
A033548 := proc(n)
local p, k;
if n = 1 then
131;
else
p := nextprime(procname(n-1)) ;
while true do
if isA033548(p) then
return p;
end if;
p := nextprime(p) ;
end do:
end if;
end proc:
seq(A033548(n), n=1..40) ; # R. J. Mathar, Jul 07 2021
MATHEMATICA
Prime[ Select[ Range[ 2000 ], Apply[ Plus, IntegerDigits[ # ] ] == Apply[ Plus, IntegerDigits[ Prime[ # ] ] ] & ] ] (* Santi Spadaro, Oct 14 2001 *)
Select[ Prime@ Range@ 5927, Plus @@ IntegerDigits@ # == Plus @@ IntegerDigits@ PrimePi@ # &] (* Robert G. Wilson v, Jun 07 2009 *)
nn=800; Transpose[Select[Thread[{Prime[Range[nn]], Range[nn]}], Total[IntegerDigits[First[#]]]== Total[ IntegerDigits[ Last[#]]]&]][[1]] (* Harvey P. Dale, Jun 13 2011 *)
PROG
(Haskell)
a033548 n = a033548_list !! (n-1)
a033548_list = filter ((== 0) . a090431 . a049084) a000040_list
-- Reinhard Zumkeller, Mar 16 2014
(PARI) is(n)=isprime(n) && sumdigits(n)==sumdigits(primepi(n)) \\ Charles R Greathouse IV, Jun 18 2015
(Python)
from sympy.ntheory.factor_ import digits
from sympy import primepi, primerange
print([n for n in primerange(1, 5901) if (sum(digits(n)[1:])==sum(digits(primepi(n))[1:]))]) # Indranil Ghosh, Jun 27 2017, after Charles R Greathouse IV
CROSSREFS
Sequence in context: A142616 A207527 A132249 * A117477 A089316 A242846
KEYWORD
nonn,base,nice
AUTHOR
Calculated by Jud McCranie
EXTENSIONS
More terms from Robert G. Wilson v, Jun 07 2009
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 17 23:23 EDT 2024. Contains 371767 sequences. (Running on oeis4.)