A381748 a(n) is the number of primes (counted with multiplicity) in row n of A051599.
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
Keywords
Examples
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
Links
- Vladimir Igorevich Lukyanchikov, Table of n, a(n) for n = 1..5000
Crossrefs
Cf. A051599.
Programs
-
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)