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.

A370388 First appearance of prime_i in A369797 or 0 if no such appearance occurs, with p_0 being 1. (A008578 but with a different offset.)

Original entry on oeis.org

10, 6, 0, 4, 3, 8, 5, 12, 7, 16, 20, 11, 13, 28, 15, 32, 36, 40, 21, 23, 48, 25, 27, 56, 60, 33, 68, 35, 72, 37, 76, 43, 88, 92, 47, 100, 51, 53, 55, 112, 116, 120, 61, 128, 65, 132, 67, 71, 75, 152, 77, 156, 160, 81, 168, 172, 176, 180, 91, 93, 188, 95, 196, 103, 208, 105, 212
Offset: 0

Views

Author

Robert G. Wilson v, Feb 28 2024

Keywords

Comments

As noted in A369797, a(n) is either 1 or a prime. But not mentioned is that all primes appear once, with two exceptions. The second prime, 3, never appears and the third prime, 5, appears twice, at 4 and 9.
A denominator of 1 in A369797 appears about 81% of the time.
The graph of this sequence has three broken lines, one at a(n) = 1, the second at ~3n/2 and the third at ~3n.

Crossrefs

Programs

  • Mathematica
    b[n_] := b[n] = (n + 2) (b[n - 1] - b[n - 2]); b[-1] = 0; b[0] = 1; a[n_] := a[n] = (3 n - 2)/GCD[3 n - 2, b[n - 2] + 2 b[n - 3]]; Flatten[ Table[ FirstPosition[ Table[ a[n], {n, 3, 220}], n], {n, Join[{1}, Prime@ Range@ 67]}]] + 2

Formula

Conjectures from Ridouane Oudra, Apr 26 2025: (Start)
a(n) = (2/3) mod prime(n), for n>2.
a(n) = (prime(n)*A039701(n) + 2)/3, for n>2.
a(n) = A008864(n) - A283419(n), for n>2. (End)