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.

A358444 a(1) = 1, a(2) = 2; for n > 2, a(n) = smallest positive number which has not appeared that has a common factor with a(n-2)^2 + a(n-1)^2.

Original entry on oeis.org

1, 2, 5, 29, 4, 857, 10, 734549, 539562233501, 6, 12433, 15, 8, 17, 353, 12, 124753, 13, 14, 20, 16, 18, 22, 24, 25, 1201, 26, 41, 2357, 28, 5556233, 37, 30, 2269, 39, 32, 35, 52, 3929, 40, 15438641, 82, 45, 65, 34, 5381, 78, 50, 36, 38, 42, 44, 46, 48, 51, 3, 9, 21, 27, 33, 54, 55, 91
Offset: 1

Views

Author

Scott R. Shannon, Nov 16 2022

Keywords

Comments

The majority of terms are concentrated along or just above the line a(n) = n, resulting in 51 fixed points in the first 5000 terms. However, some terms are much larger because the sum of the squares of the previous two terms is a prime number.
Conjecture: the sequence is a permutation of the positive integers.

Examples

			a(5) = 4 as a(3)^2 + a(4)^2 = 25 + 841 = 866, and 4 is the smallest unused number that shares a factor with 866.
a(9) = 539562233501 as a(7)^2 + a(8)^2 = 100 + 539562233401 = 539562233501, which is a prime number.
		

Crossrefs

Programs

  • Mathematica
    nn = 120; c[] = False; q[] = 1; Do[Set[{a[i], c[i], q[i]}, {i, True, 2}], {i, 2}]; i = a[1]^2; j = a[2]^2; Do[k = i + j; s = FactorInteger[k][[All, 1]]; Do[(m = q[#]; While[c[# m], m++]; q[#] = m; If[# m < k, k = # m]) &[s[[n]]], {n, Length[s]}]; Set[{a[n], c[k], i, j}, {k, True, j, k^2}], {n, 3, nn}]; Array[a, nn] (* Michael De Vlieger, Nov 17 2022 *)