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.

A358156 a(n) is the smallest number k such that the sum of k consecutive prime numbers starting with the n-th prime is a square.

This page as a plain text file.
%I A358156 #41 Dec 14 2022 16:25:39
%S A358156 9,23,4,1862,14,3,2,211,331,163,366,3,124,48,2,449,8403,121,35,2,4,
%T A358156 105,77,43,190769,1726,234,248,200,295,293,73,4,873,32,64,2456139382,
%U A358156 8,4519,14,123,5,9395,296,26,5,3479,810,9,7091,1669,157,1189,12559,269,4930,21,376,3
%N A358156 a(n) is the smallest number k such that the sum of k consecutive prime numbers starting with the n-th prime is a square.
%C A358156 a(60) > 10^10 and a(68) > 10^13. - _Martin Ehrenstein_, Nov 09 2022
%H A358156 Todor Szimeonov, <a href="https://newprimax.blogspot.com/2022/11/square-of-prime-numbers.html">Square of prime numbers</a>
%e A358156 For n=7, prime(7) = 17 and starting there 2 primes 17 + 19 = 36 which is square, so that a(7)=2.
%p A358156 f:= proc(n) local p,s,k;
%p A358156   p:= ithprime(n); s:= p;
%p A358156   for k from 2 do
%p A358156     p:= nextprime(p);
%p A358156     s:= s+p;
%p A358156     if issqr(s) then return k fi
%p A358156   od
%p A358156 end proc:
%p A358156 map(f, [$1..36]); # _Robert Israel_, Nov 08 2022
%t A358156 a[n_] := Module[{p = s = Prime[n], k = 1}, While[! IntegerQ[Sqrt[s]], p = NextPrime[p]; s += p; k++]; k]; Array[a, 36] (* _Amiram Eldar_, Nov 08 2022 *)
%Y A358156 Cf. A000040, A000290, A105720, A230327 (exchanges the roles of n, k), A287027 (squares reached).
%Y A358156 Indices of terms: A064397 (2's), A076305 (3's), A072849 (4's), A166255 (70's), A166261 (120's).
%K A358156 nonn
%O A358156 1,1
%A A358156 _Todor Szimeonov_, Nov 01 2022
%E A358156 a(25)-a(36) from _Robert Israel_, Nov 08 2022
%E A358156 a(37)-a(59) from _Martin Ehrenstein_, Nov 09 2022