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-4 of 4 results.

A106727 Triangle T(n,k) = (f(n+1)*f(k+1) mod 10), where f(j) = 10 - (prime(j+3) mod 10), read by rows.

Original entry on oeis.org

9, 7, 1, 1, 3, 9, 9, 7, 1, 9, 3, 9, 7, 3, 1, 1, 3, 9, 1, 7, 9, 3, 9, 7, 3, 1, 7, 1, 7, 1, 3, 7, 9, 3, 9, 1, 9, 7, 1, 9, 3, 1, 3, 7, 9, 7, 1, 3, 7, 9, 3, 9, 1, 7, 1, 1, 3, 9, 1, 7, 9, 7, 3, 1, 3, 9, 9, 7, 1, 9, 3, 1, 3, 7, 9, 7, 1, 9, 1, 3, 9, 1, 7, 9, 7, 3, 1, 3, 9, 1, 9
Offset: 0

Views

Author

Roger L. Bagula, May 14 2005

Keywords

Examples

			Triangle begins:
  9;
  7, 1;
  1, 3, 9;
  9, 7, 1, 9;
  3, 9, 7, 3, 1;
  1, 3, 9, 1, 7, 9;
  3, 9, 7, 3, 1, 7, 1;
		

Crossrefs

Programs

  • Mathematica
    f[n_]:= 10 - Mod[Prime[n+3], 10];
    Table[Mod[f[n+1]*f[k+1], 10], {n,0,15}, {k,0,n}]//Flatten
  • Sage
    def f(n): return 10 - (nth_prime(n+3)%10)
    def A106727(n,k): return (f(n+1)*f(k+1))%10
    flatten([[A106727(n,k) for k in (0..n)] for n in (0..15)]) # G. C. Greubel, Sep 10 2021

Formula

T(n, k) = (f(n+1)*f(k+1) mod 10) where f(j) = 10 - (prime(j+3) mod 10).

A122754 a(n) = 10*n - A101306(n).

Original entry on oeis.org

8, 15, 20, 23, 32, 39, 42, 43, 50, 51, 60, 63, 72, 79, 82, 89, 90, 99, 102, 111, 118, 119, 126, 127, 130, 139, 146, 149, 150, 157, 160, 169, 172, 173, 174, 183, 186, 193, 196, 203, 204, 213, 222, 229, 232, 233, 242, 249, 252, 253
Offset: 1

Views

Author

Roger L. Bagula, Sep 21 2006

Keywords

Crossrefs

Cf. A101306.
Partial sums of A072003.

Programs

  • Mathematica
    Table[Sum[10 - Mod[Prime[n], 10], {n, 1, m}], {m, 1, 50}]

Formula

a(n) = Sum_{i=1..n} (10 - A007652(n)).

Extensions

Definition simplified by the Assoc. Eds. of the OEIS, Mar 27 2010

A071641 a(n) defined by recursion in the formula section.

Original entry on oeis.org

1, 1, 1, 1, 3, 7, 9, 3, 7, 3, 7, 3, 5, 7, 7, 7, 9, 8, 7, 5, 7, 7, 3, 3, 9, 3, 3, 1, 7, 7, 3, 8, 8, 3, 5, 7, 1, 1, 7, 8, 7, 7, 3, 3, 7, 3, 3, 8, 7, 7, 7, 7, 7, 9, 8, 7, 5, 7, 7, 1, 1, 3, 3, 8, 7, 3, 5, 1, 3, 8, 5, 3, 5, 3, 1, 7, 1, 3, 7, 7, 9, 7, 9, 3, 3, 7, 7, 7, 7, 3, 7, 3, 9, 5, 9, 7, 3, 7, 8, 5, 9, 7, 9, 5, 5
Offset: 0

Views

Author

Roger L. Bagula, Jun 22 2002

Keywords

Comments

All terms are in {1, 3, 5, 7, 8, 9}.

References

  • Ivars Peterson, The Jungles of Randomness, 1998, John Wiley and Sons, Inc., page 207.

Crossrefs

Programs

  • Mathematica
    f[0]=f[1]=f[2]=f[3]=1; f[x_] := f[x]=f[x-1]+f[x-4]+Floor[f[x-1]/10+f[x-4]/10];
    g[x_] := g[x]=9-Mod[f[x], 9];
    h[x_] := h[x]=10-Mod[Prime[g[x]], 10];
    Table[h[n], {n, 0, 200}];

Formula

a(n) = 10 - (prime(g(n)) mod 10) with g(n) = 9 - (f(n) mod 9) and f(n) = f(n-1) + f(n-4) + floor((f(n-1) + f(n-4))/10) for n>= 4, f(n) = 1 for n<4.

Extensions

Edited by Robert G. Wilson v, Jun 25 2002
Edited by the Associate Editors of the OEIS, Jan 28 2022

A074879 10 - Mod(prime(n),10) when prime(n) + 22 = prime(n+1).

Original entry on oeis.org

1, 9, 9, 3, 1, 1, 1, 3, 3, 1, 3, 1, 3, 1, 1, 3, 1, 9, 1, 3, 1, 3, 1, 9, 1, 3, 9, 3, 9, 3, 3, 1, 9, 3, 1, 1, 3, 9, 9, 3, 3, 1, 1, 3, 9, 9, 1, 1, 3, 3, 1, 3, 3, 1, 1, 1, 9, 9, 1, 1, 9, 3, 1, 9, 1, 3, 1, 1, 9, 1, 1, 1, 3, 1, 3, 9, 9, 1, 1, 1, 1, 1, 3, 1, 1, 1, 3, 1, 9, 9, 1, 3, 9, 1, 3, 1, 9, 3, 1, 9, 9, 9, 1, 1, 1
Offset: 1

Views

Author

Roger L. Bagula, Sep 30 2002

Keywords

Crossrefs

Programs

  • Magma
    [10-(n mod 10): n in PrimesUpTo(50000) | n+22 eq NextPrime(n)];  // Bruno Berselli, Apr 12 2011
  • Mathematica
    10 - Mod[ Prime[ Select[ Range[5220], Prime[ # ] + 22 == Prime[ # + 1] & ]], 10]
    10-Mod[#,10]&/@Transpose[Select[Partition[Prime[Range[6000]],2,1], Last[#]- First[#]==22&]][[1]] (* Harvey P. Dale, Apr 12 2011 *)

Extensions

Edited by Robert G. Wilson v and N. J. A. Sloane, Oct 03 2002
Showing 1-4 of 4 results.