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.

A174996 Triangle read by rows: T(n,k) = (prime(n)-1) mod prime(k).

Original entry on oeis.org

1, 0, 2, 0, 1, 4, 0, 0, 1, 6, 0, 1, 0, 3, 10, 0, 0, 2, 5, 1, 12, 0, 1, 1, 2, 5, 3, 16, 0, 0, 3, 4, 7, 5, 1, 18, 0, 1, 2, 1, 0, 9, 5, 3, 22, 0, 1, 3, 0, 6, 2, 11, 9, 5, 28, 0, 0, 0, 2, 8, 4, 13, 11, 7, 1, 30, 0, 0, 1, 1, 3, 10, 2, 17, 13, 7, 5, 36, 0, 1, 0, 5, 7, 1, 6, 2, 17, 11, 9, 3, 40, 0, 0, 2, 0, 9, 3, 8, 4, 19, 13, 11, 5, 1, 42
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Dec 02 2010

Keywords

Examples

			The triangle starts in row n=0 with columns 1<=k<= n as:
  1;
  0, 2;
  0, 1, 4;
  0, 0, 1, 6;
  0, 1, 0, 3, 10;
  0, 0, 2, 5,  1, 12;
  0, 1, 1, 2,  5,  3, 16;
  0, 0, 3, 4,  7,  5,  1, 18;
  0, 1, 2, 1,  0,  9,  5,  3, 22;
  0, 1, 3, 0,  6,  2, 11,  9,  5, 28;
		

Crossrefs

Programs

  • Magma
    [(NthPrime(n)-1) mod NthPrime(k): k in [1..n], n in [1..15]]; // G. C. Greubel, Apr 12 2024
    
  • Mathematica
    Flatten[Table[Mod[Prime[n]-1,Prime[k]],{n,15},{k,n}]]  (* Harvey P. Dale, Apr 23 2011 *)
  • SageMath
    flatten([[(nth_prime(n)-1)%nth_prime(k) for k in range(1,n+1)] for n in range(1,16)]) # G. C. Greubel, Apr 12 2024

A177266 Triangle read by rows: R(n,k) = 2^(semiprime(n)-semiprime(k)) mod semiprime(n).

Original entry on oeis.org

1, 4, 1, 5, 8, 1, 4, 6, 2, 1, 2, 4, 4, 2, 1, 8, 2, 4, 2, 2, 1, 11, 8, 1, 11, 2, 1, 1, 14, 20, 8, 4, 14, 18, 2, 1, 2, 13, 11, 18, 23, 24, 16, 8, 1, 10, 22, 6, 16, 14, 20, 6, 16, 2, 1, 17, 29, 16, 8, 17, 25, 4, 2, 25, 29, 1, 30, 16, 2, 18, 16, 8, 32, 16, 2, 18, 2, 1, 23, 32, 4, 2, 22
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Dec 10 2010

Keywords

Examples

			Triangle begins:
1,
4, 1,
5, 8, 1,
4, 6, 2, 1,
2, 4, 4, 2, 1,
8, 2, 4, 2, 2, 1,
		

Crossrefs

Programs

  • Mathematica
    Table[PowerMod[2, #[[n]] - #[[;;n]], #[[n]]], {n, Length[#]}] & [Select[Range[50], PrimeOmega[#] == 2 &]] (* Paolo Xausa, Jun 28 2024 *)
  • PARI
    trg(nn) = {semip = select(n->bigomega(n) == 2, vector(nn, i, i)); for (n = 1, #semip, for (k = 1, n, print1(2^(semip[n] - semip[k]) % semip[n], ", ");); print(););} \\ Michel Marcus, Sep 11 2013

Extensions

Corrected by D. S. McNeil, Dec 10 2010
Showing 1-2 of 2 results.