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.

A034970 a(n) is the greatest prime factor of a(n-2)*a(n-1)-1.

Original entry on oeis.org

2, 3, 5, 7, 17, 59, 167, 821, 2539, 1042259, 508903, 5765312303, 1461701, 1404527126434567, 2034580216153, 97552206663238517, 3105563257, 46137561830961960349, 9777395920402541, 6719860896292085951563127, 5367788603966004659, 33011914147
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • Haskell
    a034970 n = a034970_list !! n
    a034970_list = 2 : 3 : (map (a006530 . (subtract 1)) $
                            zipWith (*) a034970_list $ tail a034970_list)
    -- Reinhard Zumkeller, Feb 23 2012
  • Maple
    with(numtheory):
    a:= proc(n) option remember; `if`(n<2, n+2,
          max(factorset(a(n-2)*a(n-1)-1)[]))
        end:
    seq(a(n), n=0..22);  # Alois P. Heinz, Feb 03 2014
  • Mathematica
    a[0] = 2; a[1] = 3; a[n_] := a[n] = FactorInteger[ a[n-2]*a[n-1] - 1][[-1, 1]]; Table[a[n], {n, 0, 21}] (* Jean-François Alcover, Mar 09 2012 *)
    nxt[{a_,b_}]:={b,FactorInteger[a*b-1][[-1,1]]}; Transpose[NestList[nxt,{2,3},25]][[1]] (* Harvey P. Dale, Apr 05 2014 *)
  • PARI
    A034970(a,b) = {local(f);f=factor(a*b-1);f[matsize(f)[1],1]}
    a=2;b=3;print(a);print(b)
    for(n=2,28,c=A034970(a,b);print(c);a=b;b=c)
    

Extensions

More terms from James Sellers
Terms corrected by Michael B. Porter, Mar 14 2010