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.

Original entry on oeis.org

5, 41, 617, 1913, 3677, 5981, 10337, 16421, 32297, 51341, 72077, 98321, 142421, 212117, 288293, 371237, 457673, 570569, 722669, 899069, 1112513, 1360517, 1614533, 1874633, 2159789, 2451389, 2776289, 3158213, 3555113, 3967277, 4402877, 4878977, 5371781, 5925317
Offset: 1

Views

Author

Zak Seidov, Apr 07 2008

Keywords

Crossrefs

Cf. A139033.

Programs

  • Maple
    s:= proc(n) option remember; `if`(n<1, 0, b(n)^2+s(n-1)) end:
    b:= proc(n) option remember; local k, m;
          k:= s(n-1); for m from 1+b(n-1)
          while not isprime(k+m^2) do od; m
        end: b(1):=1:
    a:= n-> s(n+1):
    seq(a(n), n=1..34);  # Alois P. Heinz, Jan 27 2023
  • Mathematica
    s[n_] := s[n] = If[n < 1, 0, b[n]^2 + s[n - 1]];
    b[n_] := b[n] = Module[{k, m}, k = s[n - 1]; For[m = 1 + b[n - 1], !PrimeQ[k + m^2], m++]; m];
    b[1] = 1;
    a[n_] := s[n + 1];
    Table[a[n], {n, 1, 34}] (* Jean-François Alcover, Apr 19 2025, after Alois P. Heinz *)

Formula

a(n) = Sum_{i=1..n+1} A139033(i). - Alois P. Heinz, Jan 27 2023

Extensions

Terms corrected by Alois P. Heinz, Jan 27 2023