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.

A137326 a(n) = sqrt(A139033(n)).

Original entry on oeis.org

1, 2, 6, 24, 36, 42, 48, 66, 78, 126, 138, 144, 162, 210, 264, 276, 288, 294, 336, 390, 420, 462, 498, 504, 510, 534, 540, 570, 618, 630, 642, 660, 690, 702, 744, 780, 840, 882, 906, 984, 1002, 1008, 1020, 1044, 1050, 1086, 1140, 1176, 1188, 1278, 1290, 1308
Offset: 1

Views

Author

Zak Seidov, Apr 07 2008

Keywords

Crossrefs

Cf. A139033.

Programs

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