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

 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 59th year, we have over 358,000 sequences, and we’ve crossed 10,300 citations (which often say “discovered thanks to the OEIS”). Other ways to Give
 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A182781 Number of n-digit terms in A048398. 2
 4, 4, 2, 1, 12, 20, 35, 28, 80, 114, 211, 228, 736, 1214, 2101, 2536, 7799, 13830, 22107, 27265, 82611, 144324, 259260, 354029, 901774, 1651718, 2913981, 3913728, 11048656, 19782855, 33483206, 49533124 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,1 COMMENTS Also, number of n-digit primes in A033075. Appears to be strictly increasing for n >= 8. - Chai Wah Wu, May 31 2017 LINKS MAPLE A182781aux := proc(Lhig, n) local lsb, a ; if n = 0 then if isprime(Lhig) then 1; else 0; end if; else a := 0 ; lsb := Lhig mod 10 ; if lsb > 0 then a := a + procname(10*Lhig+lsb-1, n-1) ; end if; if lsb < 9 then a := a + procname(10*Lhig+lsb+1, n-1) ; end if; a; end if; end proc: A182781 := proc(n) if n = 1 then 4; else a := 0 ; for l from 1 to 9 do a := a + A182781aux(l, n-1) ; end do: a ; end if; end proc: # R. J. Mathar, Feb 01 2011 PROG (Python 3.2 or higher) from itertools import product, accumulate from sympy import isprime def A182781(n): if n == 1: return 4 count = 0 for d in [1, 3, 7, 9]: for elist in product([-1, 1], repeat=n-1): flist = [str(x) for x in accumulate([d]+list(elist)) if 0 <= x < 10] if len(flist) == n and flist[-1] != '0' and is_prime(int(''.join(flist[::-1]))): count += 1 return count # Chai Wah Wu, Jun 05 2017 CROSSREFS Cf. A033075, A048398. Sequence in context: A153163 A168455 A300153 * A291085 A193556 A120438 Adjacent sequences: A182778 A182779 A182780 * A182782 A182783 A182784 KEYWORD nonn,base,more AUTHOR Zak Seidov, Feb 01 2011 EXTENSIONS a(22)-a(24) from Chai Wah Wu, May 31 2017 a(25)-a(32) from Chai Wah Wu, Jun 05 2017 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.

Last modified December 6 21:00 EST 2022. Contains 358648 sequences. (Running on oeis4.)