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.

A139034 Prime numbers appearing in A139033.

This page as a plain text file.
%I A139034 #17 Apr 19 2025 03:49:15
%S A139034 5,41,617,1913,3677,5981,10337,16421,32297,51341,72077,98321,142421,
%T A139034 212117,288293,371237,457673,570569,722669,899069,1112513,1360517,
%U A139034 1614533,1874633,2159789,2451389,2776289,3158213,3555113,3967277,4402877,4878977,5371781,5925317
%N A139034 Prime numbers appearing in A139033.
%H A139034 Alois P. Heinz, <a href="/A139034/b139034.txt">Table of n, a(n) for n = 1..10000</a> (first 2000 terms from Zak Seidov)
%F A139034 a(n) = Sum_{i=1..n+1} A139033(i). - _Alois P. Heinz_, Jan 27 2023
%p A139034 s:= proc(n) option remember; `if`(n<1, 0, b(n)^2+s(n-1)) end:
%p A139034 b:= proc(n) option remember; local k, m;
%p A139034       k:= s(n-1); for m from 1+b(n-1)
%p A139034       while not isprime(k+m^2) do od; m
%p A139034     end: b(1):=1:
%p A139034 a:= n-> s(n+1):
%p A139034 seq(a(n), n=1..34);  # _Alois P. Heinz_, Jan 27 2023
%t A139034 s[n_] := s[n] = If[n < 1, 0, b[n]^2 + s[n - 1]];
%t A139034 b[n_] := b[n] = Module[{k, m}, k = s[n - 1]; For[m = 1 + b[n - 1], !PrimeQ[k + m^2], m++]; m];
%t A139034 b[1] = 1;
%t A139034 a[n_] := s[n + 1];
%t A139034 Table[a[n], {n, 1, 34}] (* _Jean-François Alcover_, Apr 19 2025, after _Alois P. Heinz_ *)
%Y A139034 Cf. A139033.
%K A139034 nonn
%O A139034 1,1
%A A139034 _Zak Seidov_, Apr 07 2008
%E A139034 Terms corrected by _Alois P. Heinz_, Jan 27 2023