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.

A054575 Number of iterations to reach new prime in A054574.

Original entry on oeis.org

4, 2, 2, 2, 3, 2, 2, 2, 2, 2, 5, 2, 10, 2, 3, 3, 2, 3, 3, 3, 3, 2, 2, 2, 2, 4, 2, 3, 3, 3, 2, 3, 3, 2, 2, 6, 18, 2, 2, 2, 16, 3, 16, 4, 2, 2, 4, 3, 2, 4, 2, 2, 5, 3, 2, 3, 2, 3, 4, 6, 3, 2, 12, 10, 2, 2, 4, 2, 4, 2, 2, 10, 2, 4, 3, 2, 4, 2, 3, 2, 2, 9, 6, 2, 2, 20, 3, 2, 3, 3, 3, 2, 10, 15, 2, 2, 11, 10
Offset: 1

Views

Author

Enoch Haga, Apr 11 2000

Keywords

Examples

			a(5)=3 because beginning at 11, the next prime, 47, is attained in 3 steps.
		

Crossrefs

Cf. A054574.

Programs

  • Mathematica
    f[n_] := n + Plus @@ Times @@@ FactorInteger@n; a[n_] := Length[NestWhileList[f, (p = Prime[n]), # == p || CompositeQ[#] &]] - 1; Array[a, 100] (* Amiram Eldar, Sep 07 2019 *)

A155187 Prime numbers q of primitive Pythagorean triangles such that perimeters are averages of twin prime pairs, p+1=q(prime), a=q^2-p^2, c=q^2+p^2, b=2*p*q, ar=a*b/2; s=a+b+c, s-+1 are primes.

Original entry on oeis.org

2, 3, 11, 71, 227, 491, 683, 1103, 1187, 2591, 3923, 4271, 4931, 6737, 7193, 7703, 8093, 8753, 8963, 9173, 9377, 10271, 13043, 13451, 13997, 15233, 15443, 15803, 15887, 17957, 18701, 19961, 20681, 21701, 22031, 22073, 24371, 24473, 24683
Offset: 1

Views

Author

Keywords

Comments

p=1, q=2(prime), a=3, b=4, c=5, s=12-+1 primes, ...

Crossrefs

Programs

  • Mathematica
    lst={};Do[p=n;q=p+1;a=q^2-p^2;c=q^2+p^2;b=2*p*q;ar=a*b/2;s=a+b+c;If[PrimeQ[s-1]&&PrimeQ[s+1],If[PrimeQ[q],AppendTo[lst,q]]],{n,8!}];lst
Showing 1-2 of 2 results.