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

A048152 Triangular array T read by rows: T(n,k) = k^2 mod n, for 1 <= k <= n, n >= 1.

Original entry on oeis.org

0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 4, 4, 1, 0, 1, 4, 3, 4, 1, 0, 1, 4, 2, 2, 4, 1, 0, 1, 4, 1, 0, 1, 4, 1, 0, 1, 4, 0, 7, 7, 0, 4, 1, 0, 1, 4, 9, 6, 5, 6, 9, 4, 1, 0, 1, 4, 9, 5, 3, 3, 5, 9, 4, 1, 0, 1, 4, 9, 4, 1, 0, 1, 4, 9, 4, 1, 0, 1, 4, 9, 3, 12, 10, 10, 12, 3, 9, 4, 1, 0
Offset: 1

Views

Author

Keywords

Examples

			Rows:
  0;
  1, 0;
  1, 1, 0;
  1, 0, 1, 0;
  1, 4, 4, 1, 0;
  1, 4, 3, 4, 1, 0;
		

Crossrefs

Cf. A060036.
Cf. A225126 (central terms).
Cf. A070430 (row 5), A070431 (row 6), A053879 (row 7), A070432 (row 8), A008959 (row 10), A070435 (row 12), A070438 (row 15), A070422 (row 20).
Cf. A046071 (in ascending order, without zeros and duplicates).
Cf. A063987 (for primes, in ascending order, without zeros and duplicates).

Programs

  • Haskell
    a048152 n k = a048152_tabl !! (n-1) !! (k-1)
    a048152_row n = a048152_tabl !! (n-1)
    a048152_tabl = zipWith (map . flip mod) [1..] a133819_tabl
    -- Reinhard Zumkeller, Apr 29 2013
  • Mathematica
    Flatten[Table[PowerMod[k,2,n],{n,15},{k,n}]] (* Harvey P. Dale, Jun 20 2011 *)

Formula

T(n,k) = A133819(n,k) mod n, k = 1..n. - Reinhard Zumkeller, Apr 29 2013
T(n,k) = (T(n,k-1) + (2k+1)) mod n. - Andrés Ventas, Apr 06 2021

A048153 a(n) = Sum_{k=1..n} (k^2 mod n).

Original entry on oeis.org

0, 1, 2, 2, 10, 13, 14, 12, 24, 45, 44, 38, 78, 77, 70, 56, 136, 129, 152, 130, 182, 209, 184, 148, 250, 325, 288, 294, 406, 365, 372, 304, 484, 561, 490, 402, 666, 665, 572, 540, 820, 805, 860, 726, 840, 897, 846, 680, 980, 1125, 1156, 1170, 1378, 1305, 1210
Offset: 1

Views

Author

Keywords

Comments

See A048152 for the array T[n,k] = k^2 mod n.
Starting with a(2)=1 each 4th term is odd: a(n=2+4*k) = 1, 13, 45, 77, 129, 209, 325, 365, ... - Zak Seidov, Apr 22 2009
Positions of squares in A048153: 1, 2, 33, 51, 69, 105, 195, 250, 294, 1250, 4913, 9583, 13778, 48778, 65603, 83521.
Corresponding values of squares are: {0, 1, 22, 34, 46, 70, 130, 175, 203, 875, 3468, 6734, 9711, 34481, 46308, 58956}^2 = {0, 1, 484, 1156, 2116, 4900, 16900, 30625, 41209, 765625, 12027024, 45346756, 94303521, 1188939361, 2144430864, 3475809936}. - Zak Seidov, Nov 02 2011
For n > 1 also row sums of A060036. - Reinhard Zumkeller, Apr 29 2013
Conjecture: a(n) <= (n^2-1)/2. - Aspen A.M. Meissner, Mar 06 2025

Examples

			a(5) = 1^2 + 2^2 + (3^2 mod 5) + (4^2 mod 5) + (5^2 mod 5) = 1 + 4 + 4 + 1 + 0 = 10. (It is easily seen that the last term, n^2 mod n, is always zero and would not need to be included.) - _M. F. Hasler_, Oct 21 2013
		

Crossrefs

Programs

Formula

a(n) == n*(n+1)*(2n+1)/6 (mod n). - Charles R Greathouse IV, Dec 28 2011
a(n) == n*(n-1)*(2n-1)/6 (mod n). - Chai Wah Wu, Jun 02 2024
a(n) mod n = A215573(n). - Alois P. Heinz, Jun 03 2024

Extensions

Definition made more explicit by M. F. Hasler, Oct 21 2013

A133819 Triangle whose rows are sequences of increasing squares: 1; 1,4; 1,4,9; ... .

Original entry on oeis.org

1, 1, 4, 1, 4, 9, 1, 4, 9, 16, 1, 4, 9, 16, 25, 1, 4, 9, 16, 25, 36, 1, 4, 9, 16, 25, 36, 49, 1, 4, 9, 16, 25, 36, 49, 64, 1, 4, 9, 16, 25, 36, 49, 64, 81, 1, 4, 9, 16, 25, 36, 49, 64, 81, 100, 1, 4, 9, 16, 25, 36, 49, 64, 81, 100, 121, 1, 4, 9, 16, 25, 36, 49, 64, 81, 100, 121, 144
Offset: 1

Views

Author

Peter Bala, Sep 25 2007

Keywords

Comments

Reading the triangle by rows produces the sequence 1,1,4,1,4,9,1,4,9,16,..., analogous to A002260.
Sequence B is called a reluctant sequence of sequence A, if B is triangle array read by rows: row number k coincides with first k elements of the sequence A. A133819 is reluctant sequence of A000290. - Boris Putievskiy, Jan 11 2013

Examples

			The triangle T(n, k) starts:
1;
1, 4;
1, 4, 9;
1, 4, 9, 16;
1, 4, 9, 16, 25;
		

Crossrefs

Programs

  • Haskell
    a133819 n k = a133819_tabl !! (n-1) !! (k-1)
    a133819_row n = a133819_tabl !! (n-1)
    a133819_tabl = map (`take` (tail a000290_list)) [1..]
    -- Reinhard Zumkeller, Nov 11 2012
  • Mathematica
    With[{sqs=Range[12]^2},Flatten[Table[Take[sqs,n],{n,12}]]] (* Harvey P. Dale, Sep 09 2012 *)

Formula

T(n, k) = k^2, n >= k >= 1. - Wolfdieter Lang, Dec 02 2014
O.g.f.: (1+qx)/((1-x)(1-qx)^3) = 1 + x(1 + 4q) + x^2(1 + 4q + 9q^2) + ... .
a(n) = A000290(m+1), where m = n-t(t+1)/2, t = floor((-1+sqrt(8*n-7))/2). - Boris Putievskiy, Jan 11 2013

Extensions

Offset changed by Reinhard Zumkeller, Nov 11 2012

A225126 Central terms of the triangle in A048152.

Original entry on oeis.org

0, 1, 4, 2, 7, 3, 10, 4, 13, 5, 16, 6, 19, 7, 22, 8, 25, 9, 28, 10, 31, 11, 34, 12, 37, 13, 40, 14, 43, 15, 46, 16, 49, 17, 52, 18, 55, 19, 58, 20, 61, 21, 64, 22, 67, 23, 70, 24, 73, 25, 76, 26, 79, 27, 82, 28, 85, 29, 88, 30, 91, 31, 94, 32, 97, 33, 100
Offset: 1

Views

Author

Reinhard Zumkeller, Apr 29 2013

Keywords

Comments

a(n) = A123684(n) for n > 1;
a(n) = A048152(2*n-1,n), central terms;
also a(n) = A060036(2*n-1,n-1) for n > 1.
a(n+1)=the remainder when n^2 is divided by 2n+1. - J. M. Bergot, Jun 25 2013

Programs

Formula

a(1) = 0, a(2*n) = n and a(2*n+1) = 3*n+1.
a(n) = 2*a(n-2)-a(n-4) for n>5. G.f.: -x^2*(x^3-4*x-1) / ((x-1)^2*(x+1)^2). - Colin Barker, May 01 2013

A060037 Triangular array T read by rows: T(n,k)=k^2 mod n, for k=1,2,...,[n/2], n=2,3,...

Original entry on oeis.org

1, 1, 1, 0, 1, 4, 1, 4, 3, 1, 4, 2, 1, 4, 1, 0, 1, 4, 0, 7, 1, 4, 9, 6, 5, 1, 4, 9, 5, 3, 1, 4, 9, 4, 1, 0, 1, 4, 9, 3, 12, 10, 1, 4, 9, 2, 11, 8, 7, 1, 4, 9, 1, 10, 6, 4, 1, 4, 9, 0, 9, 4, 1, 0, 1, 4, 9, 16, 8, 2, 15, 13, 1, 4, 9, 16, 7, 0, 13, 10, 9, 1, 4, 9, 16, 6, 17, 11, 7, 5, 1, 4, 9, 16, 5, 16
Offset: 2

Views

Author

N. J. A. Sloane, Mar 17 2001

Keywords

Examples

			1; 1; 1,0; 1,4; 1,4,3; 1,4,2; ...
		

Crossrefs

Programs

  • Mathematica
    Flatten[Table[PowerMod[k,2,n],{n,2,20},{k,Floor[n/2]}]] (* Harvey P. Dale, Mar 05 2012 *)

Extensions

More terms from Larry Reeves (larryr(AT)acm.org), Mar 20 2001

A343720 Triangle read by rows: T(n,k) = k^2 mod n for k = 0..n-1, n >= 1.

Original entry on oeis.org

0, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 4, 4, 1, 0, 1, 4, 3, 4, 1, 0, 1, 4, 2, 2, 4, 1, 0, 1, 4, 1, 0, 1, 4, 1, 0, 1, 4, 0, 7, 7, 0, 4, 1, 0, 1, 4, 9, 6, 5, 6, 9, 4, 1, 0, 1, 4, 9, 5, 3, 3, 5, 9, 4, 1, 0, 1, 4, 9, 4, 1, 0, 1, 4, 9, 4, 1, 0, 1, 4, 9, 3, 12, 10, 10, 12, 3, 9, 4, 1
Offset: 1

Views

Author

Jon E. Schoenfield, Apr 26 2021

Keywords

Comments

Similar to A048152 and A060036, but each row in this sequence begins at k = 0 and ends at k = n-1 (the minimum and maximum residues modulo n, respectively).

Examples

			Triangle begins:
  n\k| 0  1  2  3  4  5  6  7  8  9 10 11
  ---+-----------------------------------
   1 | 0
   2 | 0, 1
   3 | 0, 1, 1
   4 | 0, 1, 0, 1
   5 | 0, 1, 4, 4, 1
   6 | 0, 1, 4, 3, 4, 1
   7 | 0, 1, 4, 2, 2, 4, 1
   8 | 0, 1, 4, 1, 0, 1, 4, 1
   9 | 0, 1, 4, 0, 7, 7, 0, 4, 1
  10 | 0, 1, 4, 9, 6, 5, 6, 9, 4, 1
  11 | 0, 1, 4, 9, 5, 3, 3, 5, 9, 4, 1
  12 | 0, 1, 4, 9, 4, 1, 0, 1, 4, 9, 4, 1
		

Crossrefs

Programs

Formula

T(n,k) = k^2 mod n.
T(n,k) = T(n,n-k).
Showing 1-6 of 6 results.