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.

Showing 1-2 of 2 results.

A362138 a(n) = gpf(a(n-1) + prime(n)) where gpf is the greatest prime factor and a(1)=2.

Original entry on oeis.org

2, 5, 5, 3, 7, 5, 11, 5, 7, 3, 17, 3, 11, 3, 5, 29, 11, 3, 7, 13, 43, 61, 3, 23, 5, 53, 13, 5, 19, 11, 23, 11, 37, 11, 5, 13, 17, 5, 43, 3, 13, 97, 3, 7, 17, 3, 107, 11, 17, 41, 137, 47, 3, 127, 3, 19, 3, 137, 23, 19, 151, 37, 43, 59, 31, 29, 5, 19, 61, 41, 197
Offset: 1

Views

Author

Sebastian F. Orellana, Jun 12 2023

Keywords

Examples

			a(3) = gpf(a(2) + prime(3)) = gpf(5+5) = 5.
		

Crossrefs

Cf. A006530 (gpf), A000040.

Programs

  • Mathematica
    gpf[n_] := FactorInteger[n][[-1, 1]]; a[1] = 2; a[n_] := a[n] = gpf[a[n - 1] + Prime[n]]; Array[a, 100] (* Amiram Eldar, Jun 15 2023 *)
  • Python
    from sympy import factorint, prime
    list=[2]
    num=1
    k=50
    for i in range(0, k):
      list.append(max(factorint(list[i]+prime(i+1))))
    print(list)

A132850 a(0)=1; a(n) = the smallest prime dividing (n+a(n-1)), for n>=1.

Original entry on oeis.org

1, 2, 2, 5, 3, 2, 2, 3, 11, 2, 2, 13, 5, 2, 2, 17, 3, 2, 2, 3, 23, 2, 2, 5, 29, 2, 2, 29, 3, 2, 2, 3, 5, 2, 2, 37, 73, 2, 2, 41, 3, 2, 2, 3, 47, 2, 2, 7, 5, 2, 2, 53, 3, 2, 2, 3, 59, 2, 2, 61, 11, 2, 2, 5, 3, 2, 2, 3, 71, 2, 2, 73, 5, 2, 2, 7, 83, 2, 2, 3, 83, 2, 2, 5, 89, 2, 2, 89, 3, 2, 2, 3, 5, 2, 2
Offset: 0

Views

Author

Leroy Quet, Nov 21 2007

Keywords

Comments

a(4n+1) = a(4n+2) = 2, for all n >= 0. a(4n) and a(4n+3) are odd primes, for all n >= 0.

Examples

			a(8) + 9 = 11 + 9 = 20. The smallest prime divisor of 20 is 2. So a(9) = 2.
		

Crossrefs

Cf. A076561.

Programs

  • Mathematica
    a = {1}; Do[AppendTo[a, FactorInteger[n + a[[ -1]]][[1, 1]]], {n, 1, 100}]; a (* Stefan Steinerberger, Nov 25 2007 *)
    nxt[{n_,a_}]:={n+1,FactorInteger[n+1+a][[1,1]]}; Transpose[NestList[nxt,{0,1},100]][[2]] (* Harvey P. Dale, Jan 21 2015 *)

Extensions

More terms from Stefan Steinerberger, Nov 25 2007
Showing 1-2 of 2 results.