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.

User: Trevor Cappallo

Trevor Cappallo's wiki page.

Trevor Cappallo has authored 2 sequences.

A308988 a(n) = A293564(n) - 1.

Original entry on oeis.org

1, 2, 6, 26, 40, 94, 184, 350, 496, 3390, 3536, 45370, 82734, 99064, 357164, 840904, 3880556, 27914936, 40517520, 104715206, 1126506904, 2084910530, 2442825346, 4332318176, 6716598046, 17736392220, 18205380336, 30869303806, 68506021364, 78491213264, 85620067844
Offset: 1

Author

Trevor Cappallo, Jul 04 2019

Keywords

Comments

The value of n such that a new record number of composites appear for (n+1)^2+1, (n+2)^2+1, (n+3)^2+1, ...
Corresponding record gap sizes are given in A308987.

Examples

			n=6   -->  6^2+1 = 37, prime
n=7   -->  7^2+1 = 50, composite
n=8   -->  8^2+1 = 65, composite
n=9   -->  9^2+1 = 82, composite
n=10  -->  10^2+1 = 101, prime
...yields the third record gap number of terms, so the start index n=6 appears as the third entry in this sequence.
		

Crossrefs

Programs

  • Mathematica
    best = c = lastBestAt = 0;
    For[i = 2, True, i += 2; c += 2,
    If[PrimeQ[i^2 + 1],
       If[c > best,
        best = c;
        bestAt = i - c;
        If[bestAt != lastBestAt, Print[{c, bestAt}]];
        lastBestAt = bestAt;
        ];
       c = 0;
       ]
    ]

Extensions

a(21)-a(31) from Giovanni Resta, Jul 05 2019

A308987 In the sequence {n^2+1} (A002522), color the primes red. When the number of terms m between successive red terms sets a new record, write down m+1.

Original entry on oeis.org

1, 2, 4, 10, 14, 16, 20, 34, 40, 46, 88, 100, 112, 130, 152, 212, 288, 330, 346, 444, 502, 526, 534, 564, 580, 614, 624, 634, 636, 640, 690
Offset: 1

Author

Trevor Cappallo, Jul 04 2019

Keywords

Comments

This sequence represents the highest gaps, given by number of terms (including the starting prime) in sequence A002522 between terms which are prime.

Examples

			n=6   -->  6^2+1 = 37, prime
n=7   -->  7^2+1 = 50, composite
n=8   -->  8^2+1 = 65, composite
n=9   -->  9^2+1 = 82, composite
n=10  -->  10^2+1 = 101, prime
...so here m=3 and we get the third term, m + 1 = 10 - 6 = 4
		

Crossrefs

A293564 gives essentially the same information.

Programs

  • Mathematica
    best = c = lastBestAt = 0;
    For[i = 2, True, i += 2; c += 2,
    If[PrimeQ[i^2 + 1],
       If[c > best,
        best = c;
        bestAt = i - c;
        If[bestAt != lastBestAt, Print[{c, bestAt}]];
        lastBestAt = bestAt;
        ];
       c = 0;
       ]
    ]
    Join[{1,2},Rest[DeleteDuplicates[Length/@SplitBy[(Range[5*10^7]^2+1),PrimeQ],GreaterEqual]+1]] (* The program generates the first 19 terms of the sequence. *)(* Harvey P. Dale, Sep 27 2024 *)

Extensions

a(21)-a(31) from Giovanni Resta, Jul 05 2019