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!)
A110742 Number of primes with digit sum n having at most n digits. 1
0, 2, 1, 8, 27, 0, 211, 500, 0, 5404, 23137, 0, 269736, 806856, 0, 10508986, 43103947, 0 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
a(3n) = 0 for n > 1.
The binary version of this sequence is the characteristic function of A000043. [David Wasserman, Dec 17 2008]
LINKS
EXAMPLE
For a(2) the two primes are 2 and 11. 101 is not included because it has 3 digits.
PROG
(PARI) f(n, i, left, num) = if (i == n - 1, return(left <= 9 && isprime(num + left*10^i))); sum(j = 0, min(left, 9), f(n, i + 1, left - j, num + j*10^i));
a(n) = f(n, 0, n, 0); \\ David Wasserman, Dec 17 2008
CROSSREFS
Cf. A110741.
Sequence in context: A160602 A160626 A052312 * A252355 A366404 A013123
KEYWORD
base,nonn,more
AUTHOR
Amarnath Murthy, Aug 10 2005
EXTENSIONS
a(7)-a(10) from Donovan Johnson, Mar 23 2008
More terms from David Wasserman, Dec 17 2008
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 September 16 06:47 EDT 2024. Contains 375959 sequences. (Running on oeis4.)