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.

A177941 a(1)=5; for n>0, a(n+1)=a(n)+p-1, where p is the smallest prime divisor of (a(n))^2-4.

Original entry on oeis.org

5, 7, 9, 15, 27, 31, 33, 37, 39, 75, 81, 159, 165, 327, 331, 333, 337, 339, 349, 351, 699, 715, 717, 721, 723, 727, 729, 745, 747, 751, 753, 757, 759, 1515, 1531, 1533, 1537, 1539, 1561, 1563, 1567, 1569, 3135, 3147, 3151, 3153, 3157, 3159, 3165, 6327, 6331, 6333, 6337
Offset: 1

Views

Author

Vladimir Shevelev, May 15 2010

Keywords

Crossrefs

Cf. A177929.

Programs

  • Maple
    A020639 := proc(n) if n = 1 then 1 ; else numtheory[factorset](n) ; min(op(%)) ; end if; end proc:
    A177941 := proc(n) option remember; if n = 1 then 5 else A020639((procname(n-1))^2-4) ; procname(n-1)+%-1 ; end if; end proc: seq(A177941(n),n=1..120) ; # R. J. Mathar, Jun 30 2010
  • Mathematica
    NestList[# + FactorInteger[#^2 - 4][[1, 1]] - 1 &, 5, 52] (* or *)
    a[1] = 5; a[n_] := a[n] = # + FactorInteger[#^2 - 4][[1, 1]] - 1 &@ a[n - 1]; Array[a, {53}] (* Michael De Vlieger, Feb 07 2016 *)
  • PARI
    lista(nn) = {my(va = vector(nn)); va[1] = 5; for (n=2, nn, va[n] = va[n-1] + factor(va[n-1]^2-4)[1,1] - 1;); va;} \\ Michel Marcus, Dec 14 2018

Extensions

Entries checked by R. J. Mathar, Jun 30 2010