login
A381748
a(n) is the number of primes (counted with multiplicity) in row n of A051599.
1
1, 2, 2, 4, 2, 4, 2, 6, 2, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 6, 2, 4, 2, 2, 2, 4, 4, 6, 2, 8, 6, 6, 2, 2, 2, 2, 4, 4, 2, 2, 2, 2, 4, 2, 2, 4, 2, 6, 2, 4, 4, 8, 2, 4, 4, 2, 2, 4, 4, 2, 2, 2, 2, 10, 2, 2, 4, 4, 2, 4, 2, 2, 2, 2, 2, 2, 4, 2, 4
OFFSET
0,2
LINKS
Vladimir Igorevich Lukyanchikov, Table of n, a(n) for n = 0..4999
EXAMPLE
2; 1 prime
3, 3; 2 primes
5, 6, 5; 2 primes
7, 11, 11, 7; 4 primes
11, 18, 22, 18, 11; 2 primes
PROG
(Python)
from sympy import *
pr = list(primerange(2, 200))
lst = []
a = []
lst.append(1)
for i in range(1, 31):
c = []
c.append(pr[i])
for j in range(1, i):
c.append(a[j-1] + a[j])
c.append(pr[i])
count_primes = sum(isprime(x) for x in c)
lst.append(count_primes)
a = c
print(*lst)
CROSSREFS
Cf. A051599.
Sequence in context: A372714 A147848 A306652 * A239614 A358216 A193432
KEYWORD
nonn
AUTHOR
STATUS
approved