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.

A383938 a(n) is the least positive integer k such that b(2*j) is prime for 1 <= j <= n but not prime for j = n+1, where b(1) = k and b(m+1) = b(m) + prime(m) for m >= 1.

This page as a plain text file.
%I A383938 #57 Aug 27 2025 09:15:29
%S A383938 2,5,21,129,69,1,51,23991,171,1371,3,322141431,1431357020859
%N A383938 a(n) is the least positive integer k such that b(2*j) is prime for 1 <= j <= n but not prime for j = n+1, where b(1) = k and b(m+1) = b(m) + prime(m) for m >= 1.
%C A383938 Similar to A227547, primes are added in successive manner except that here the sequence breaks if an even-indexed term is not prime and considers preceding even-indexed prime as the last term of the sequence. For example, a(2) = 21 [21, 23, 26, 31, 38, 49] but since 49 is not prime, last two terms (38 and 49) are omitted leaving 31 as last term in the sequence.
%C A383938 a(12) is the last term, because b(j) is always divisible by 11 for some j in {2, 4, 6, 8, 10, 14, 16, 18, 22, 24, 26}. - _Pontus von Brömssen_, Aug 19 2025
%e A383938 a(n) = k, b(m+1) = b(m) + prime(m); b(1) = k
%e A383938 For n = 0, a(0) = 2; b(m+1) = b(m) + prime(m): [2]
%e A383938 For n = 1, a(1) = 5; b(m+1) = b(m) + prime(m): [5, 7(5+2)]
%e A383938 For n = 2, a(2) = 21; b(m+1) = b(m) + prime(m): [21, 23(21+2), 26(23+3), 31(26+5)]
%e A383938 For n = 3, a(3) = 129; b(m+1) = b(m) + prime(m): [129, 131(129+2), 134(131+3), 139(134+5), 146(139+7), 157(146+11)]
%e A383938 For n = 4, a(4) = 69; b(m+1) = b(m) + prime(m): [69, 71(69+2), 74(71+3), 79(74+5), 86(79+7), 97(86+11), 110(97+13), 127(110+17)]
%e A383938 For n = 5, a(5) = 1; b(m+1) = b(m) + prime(m): [1, 3(1+2), 6(3+3), 11(6+5), 18(11+7), 29(18+11), 42(29+13), 59(42+17), 78(59+19), 101(78+23)]
%e A383938 For a(n), even-indexed term is prime. e.g. for a(3) = 129 [129, 131, 134, 139, 146, 157], even indexed terms 131, 139, 157 are primes.
%o A383938 (PARI) a(n) = my(vp=concat(2, vector(n+1, i, sum(k=1, 2*i+1, prime(k)))), v=concat(vector(n, i, 1), 0), k=1); while (apply(ispseudoprime, vector(n+1, i, vp[i]+k)) != v, k++); k; \\ _Michel Marcus_, Aug 19 2025
%Y A383938 Cf. A014284, A092163, A109723, A227547.
%K A383938 nonn,fini,full,new
%O A383938 0,1
%A A383938 _Om S. M. Yadav_, Aug 18 2025
%E A383938 a(11) from _Michel Marcus_, Aug 19 2025
%E A383938 a(12) from _Pontus von Brömssen_, Aug 19 2025