cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A381748 a(n) is the number of primes (counted with multiplicity) in row n of A051599.

This page as a plain text file.
%I A381748 #18 Mar 16 2025 21:37:08
%S A381748 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,
%T A381748 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,
%U A381748 2,4,2,2,2,2,2,2,4,2,4
%N A381748 a(n) is the number of primes (counted with multiplicity) in row n of A051599.
%H A381748 Vladimir Igorevich Lukyanchikov, <a href="/A381748/b381748.txt">Table of n, a(n) for n = 1..5000</a>
%e A381748 2;                                                    1 prime
%e A381748 3,  3;                                                2 primes
%e A381748 5,  6,   5;                                           2 primes
%e A381748 7,  11,  11,  7;                                      4 primes
%e A381748 11, 18,  22,  18,  11;                                2 primes
%o A381748 (Python)
%o A381748 from sympy import *
%o A381748 pr = list(primerange(2, 200))
%o A381748 lst = []
%o A381748 a = []
%o A381748 lst.append(1)
%o A381748 for i in range(1, 31):
%o A381748     c = []
%o A381748     c.append(pr[i])
%o A381748     for j in range(1, i):
%o A381748         c.append(a[j-1] + a[j])
%o A381748     c.append(pr[i])
%o A381748     count_primes = sum(isprime(x) for x in c)
%o A381748     lst.append(count_primes)
%o A381748     a = c
%o A381748 print(*lst)
%Y A381748 Cf. A051599.
%K A381748 nonn
%O A381748 0,2
%A A381748 _Vladimir Igorevich Lukyanchikov_, Mar 06 2025