login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A074830 Number of base reversals which result in a prime for bases less than n. 0
0, 0, 1, 0, 3, 2, 5, 2, 1, 3, 7, 3, 10, 4, 3, 3, 12, 4, 9, 5, 4, 7, 14, 4, 11, 5, 5, 7, 15, 3, 20, 9, 6, 6, 12, 3, 19, 11, 9, 6, 23, 4, 26, 8, 6, 10, 24, 7, 17, 11, 7, 15, 33, 4, 19, 9, 12, 12, 22, 5, 30, 16, 11, 13, 15, 4, 38, 15, 14, 8, 36, 5, 40, 17, 7, 13, 32, 4, 39, 13, 6, 13, 38, 4, 25 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,5

COMMENTS

If n is composite, then there does not exist any base greater than n whose base reversal is prime. And if n is a prime, then there exist an infinite number of bases greater than n whose base reversals are primes (hence this sequence's restriction to bases up to n only).

LINKS

Table of n, a(n) for n=1..85.

EXAMPLE

a(5) = 3 because 5 = 101_2 and its reversal 101_2 = 5, 5 = 12_3 and its reversal 21_3 = 7, 5 = 11_4 and its reversal 11_4 = 5. 3, 7, and 5 are all primes.

MATHEMATICA

a[n_] := Block[{c = 0, b = 2}, While[b < n + 1, If[ PrimeQ[ FromDigits[ Reverse[ IntegerDigits[n, b]], b]], c++ ]; b++ ]; c]; Table[ a[n], {n, 1, 85}]

PROG

(PARI) a(n) = sum(b=2, n-1, isprime(fromdigits(Vecrev(digits(n, b)), b))); \\ Michel Marcus, Apr 29 2021

CROSSREFS

Sequence in context: A093527 A088233 A056008 * A182983 A231146 A287692

Adjacent sequences:  A074827 A074828 A074829 * A074831 A074832 A074833

KEYWORD

base,easy,nonn

AUTHOR

Robert G. Wilson v, Sep 09 2002

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified October 20 04:52 EDT 2021. Contains 348099 sequences. (Running on oeis4.)