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.

A048155 a(n)=Sum{T(n,k): k=1,2,...,n}, array T as in A048154.

Original entry on oeis.org

0, 1, 3, 4, 10, 15, 21, 16, 27, 45, 55, 60, 78, 91, 105, 96, 136, 135, 171, 180, 210, 231, 253, 240, 250, 325, 243, 364, 406, 435, 465, 384, 528, 561, 595, 540, 666, 703, 741, 720, 820, 861, 903, 924, 945, 1035, 1081, 1056, 1029
Offset: 1

Views

Author

Keywords

Examples

			a(3) = 3 since (1^3 mod 3) + (2^3 mod 3) + (3^3 mod 3) = (1 mod 3) + (8 mod 3) + (27 mod 3) = 1 + 2 + 0 = 3.
		

Crossrefs

Cf. A048154.

Programs

  • Mathematica
    Table[Sum[Mod[k^3, n], {k, n}], {n, 50}] (* or *)
    Table[Sum[k (1 - Floor[k^3/n] + Floor[(k^3 - 1)/n]), {k, n}], {n, 50}] (* Michael De Vlieger, Jun 26 2016 *)

Formula

a(n) = Sum_{k=1..n} k*(1-floor(k^3/n)+floor((k^3 -1)/n)). - Anthony Browne, Jun 26 2016

A049769 Triangular array T read by rows: T(n,k) = (k^3 mod n) + (n^3 mod k).

Original entry on oeis.org

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

Views

Author

Keywords

Examples

			Triangle begins as:
  0;
  1, 0;
  1, 3, 0;
  1, 0, 4, 0;
  1, 4, 4, 5, 0;
  1, 2, 3, 4, 6, 0;
  1, 2, 7, 4, 9, 7, 0;
  1, 0, 5, 0, 7, 2, 8, 0;
		

Crossrefs

Programs

  • GAP
    Flat(List([1..15], n-> List([1..n], k-> PowerMod(k,3,n) + PowerMod(n,3,k) ))); # G. C. Greubel, Dec 13 2019
  • Magma
    [[Modexp(k,3,n) + Modexp(n,3,k): k in [1..n]]: n in [1..15]]; // G. C. Greubel, Dec 13 2019
    
  • Maple
    seq(seq( `mod`(k^3, n) + `mod`(n^3, k), k = 1..n), n = 1..15); # G. C. Greubel, Dec 13 2019
  • Mathematica
    Table[PowerMod[k,3,n] + PowerMod[n,3,k], {n,15}, {k,n}]//Flatten (* G. C. Greubel, Dec 13 2019 *)
  • PARI
    T(n,k) = lift(Mod(k,n)^3) + lift(Mod(n,k)^3);
    for(n=1,15, for(k=1,n, print1(T(n,k), ", "))) \\ G. C. Greubel, Dec 13 2019
    
  • Sage
    [[power_mod(k,3,n) + power_mod(n,3,k) for k in (1..n)] for n in (1..15)] # G. C. Greubel, Dec 13 2019
    

Formula

T(n, k) = A048154(n, k) + A049761(n, k). - Michel Marcus, Dec 13 2019
Showing 1-2 of 2 results.