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-10 of 19 results. Next

A010879 Final digit of n.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Also decimal expansion of 137174210/1111111111 = 0.1234567890123456789012345678901234... - Jason Earls, Mar 19 2001
In general the base k expansion of A062808(k)/A048861(k) (k>=2) will produce the numbers 0,1,2,...,k-1 repeated with period k, equivalent to the sequence n mod k. The k-digit number in base k 123...(k-1)0 (base k) expressed in decimal is A062808(k), whereas A048861(k) = k^k-1. In particular, A062808(10)/A048861(10)=1234567890/9999999999=137174210/1111111111.
a(n) = n^5 mod 10. - Zerinvary Lajos, Nov 04 2009

Crossrefs

Cf. A008959, A008960, A070514. - Doug Bell, Jun 15 2015
Partial sums: A130488. Other related sequences A130481, A130482, A130483, A130484, A130485, A130486, A130487.

Programs

Formula

a(n) = n mod 10.
Periodic with period 10.
From Hieronymus Fischer, May 31 and Jun 11 2007: (Start)
Complex representation: a(n) = 1/10*(1-r^n)*sum{1<=k<10, k*product{1<=m<10,m<>k, (1-r^(n-m))}} where r=exp(Pi/5*i) and i=sqrt(-1).
Trigonometric representation: a(n) = (256/5)^2*(sin(n*Pi/10))^2 * sum{1<=k<10, k*product{1<=m<10,m<>k, (sin((n-m)*Pi/10))^2}}.
G.f.: g(x) = (Sum_{k=1..9} k*x^k)/(1-x^10) = -x*(1 +2*x +3*x^2 +4*x^3 +5*x^4 +6*x^5 +7*x^6 +8*x^7 +9*x^8) / ( (x-1) *(1+x) *(x^4+x^3+x^2+x+1) *(x^4-x^3+x^2-x+1) ).
Also: g(x) = x*(9*x^10-10*x^9+1)/((1-x^10)*(1-x)^2).
a(n) = n mod 2+2*(floor(n/2)mod 5) = A000035(n) + 2*A010874(A004526(n)).
Also: a(n) = n mod 5+5*(floor(n/5)mod 2) = A010874(n)+5*A000035(A002266(n)). (End)
a(n) = 10*{n/10}, where {x} means fractional part of x. - Enrique Pérez Herrero, Jul 30 2009
a(n) = n - 10*A059995(n). - Reinhard Zumkeller, Jul 26 2011
a(n) = n^k mod 10, for k > 0, where k mod 4 = 1. - Doug Bell, Jun 15 2015

Extensions

Formula section edited for better readability by Hieronymus Fischer, Jun 13 2012

A070431 a(n) = n^2 mod 6.

Original entry on oeis.org

0, 1, 4, 3, 4, 1, 0, 1, 4, 3, 4, 1, 0, 1, 4, 3, 4, 1, 0, 1, 4, 3, 4, 1, 0, 1, 4, 3, 4, 1, 0, 1, 4, 3, 4, 1, 0, 1, 4, 3, 4, 1, 0, 1, 4, 3, 4, 1, 0, 1, 4, 3, 4, 1, 0, 1, 4, 3, 4, 1, 0, 1, 4, 3, 4, 1, 0, 1, 4, 3, 4, 1, 0, 1, 4, 3, 4, 1, 0, 1, 4, 3, 4, 1, 0, 1, 4, 3, 4, 1, 0, 1, 4, 3, 4, 1, 0, 1, 4, 3, 4
Offset: 0

Views

Author

N. J. A. Sloane, May 12 2002

Keywords

Comments

a(m*n) = a(m)*a(n) mod 6; a(3*n+k) = a(3*n-k) for k <= 3*n. - Reinhard Zumkeller, Apr 24 2009
Equivalently n^6 mod 6. - Zerinvary Lajos, Nov 06 2009
Equivalently: n^(2*m + 4) mod 6; n^(2*m + 2) mod 6. - G. C. Greubel, Apr 01 2016

Crossrefs

Programs

Formula

G.f.: -x*(1+4*x+3*x^2+4*x^3+x^4)/((x-1)*(1+x)*(1+x+x^2)*(x^2-x+1)). - R. J. Mathar, Jul 23 2009
a(n) = a(n-6). - Reinhard Zumkeller, Apr 24 2009
From G. C. Greubel, Apr 01 2016: (Start)
a(6*m) = 0.
a(2*n) = 4*A011655(n).
a(n) = (1/6)*(13 + 3*(-1)^n - 12*cos(n*Pi/3) - 4*cos(2*n*Pi/3)).
G.f.: (x +4*x^2 +3*x^3 + 4*x^4 +x^5)/(1 - x^6). (End)

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

A008960 Final digit of cubes: n^3 mod 10.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Decimal expansion of 208284810/1111111111. - Alexander R. Povolotsky, Mar 08 2013

Crossrefs

Cf. A167176.
Cf. A010879, A008959, A070514. - Doug Bell, Jun 15 2015

Programs

  • Magma
    [n^3 mod 10: n in [0..80]]; // Vincenzo Librandi, Mar 26 2013
    
  • Mathematica
    Table[Mod[n^3,10],{n,0,200}] (* Vladimir Joseph Stephan Orlovsky, Apr 23 2011 *)
    LinearRecurrence[{0, 0, 0, 0, 0, 0, 0, 0, 0, 1},{0, 1, 8, 7, 4, 5, 6, 3, 2, 9},81] (* Ray Chandler, Aug 26 2015 *)
  • PARI
    a(n)=n^3%10 \\ Charles R Greathouse IV, Mar 08 2013
    
  • PARI
    concat(0, Vec(x*(1+8*x+7*x^2+4*x^3+5*x^4+6*x^5+3*x^6+2*x^7+9*x^8) / ((1-x)*(1+x)*(1-x+x^2-x^3+x^4)*(1+x+x^2+x^3+x^4)) + O(x^100))) \\ Colin Barker, Nov 30 2015
  • Sage
    [power_mod(n,3,10 ) for n in range(0, 81)] # Zerinvary Lajos, Oct 29 2009
    

Formula

Periodic with period 10. - Franklin T. Adams-Watters, Mar 13 2006
a(n) = 4.5 -cos(Pi*n/5) +(1/2*(-(5-5^(1/2))^(1/2) +(5+5^(1/2))^(1/2))*2^(1/2))*sin(Pi*n/5) -cos(2*Pi*n/5) +(-1/10*(-(5-5^(1/2))^(1/2)+3*(5+5^(1/2))^(1/2))*2^(1/2))*sin(2*Pi*n/5) -cos(3*Pi*n/5) +(-1/2*((5-5^(1/2))^(1/2) +(5+5^(1/2))^(1/2))*2^(1/2))*sin(3*Pi*n/5) -cos(4*Pi*n/5) +( -1/10*(3*(5-5^(1/2))^(1/2) +(5 +5^(1/2))^(1/2))*2^(1/2))*sin(4*Pi*n/5) -0.5*(-1)^n. - Richard Choulet, Dec 12 2008
a(n) = n^k mod 10; for k > 0 where k mod 4 = 3. - Doug Bell, Jun 15 2015
G.f.: x*(1+8*x+7*x^2+4*x^3+5*x^4+6*x^5+3*x^6+2*x^7+9*x^8) / ((1-x)*(1+x)*(1-x+x^2-x^3+x^4)*(1+x+x^2+x^3+x^4)). - Colin Barker, Nov 30 2015

A070435 a(n) = n^2 mod 12, or alternately n^4 mod 12.

Original entry on oeis.org

0, 1, 4, 9, 4, 1, 0, 1, 4, 9, 4, 1, 0, 1, 4, 9, 4, 1, 0, 1, 4, 9, 4, 1, 0, 1, 4, 9, 4, 1, 0, 1, 4, 9, 4, 1, 0, 1, 4, 9, 4, 1, 0, 1, 4, 9, 4, 1, 0, 1, 4, 9, 4, 1, 0, 1, 4, 9, 4, 1, 0, 1, 4, 9, 4, 1, 0, 1, 4, 9, 4, 1, 0, 1, 4, 9, 4, 1, 0, 1, 4, 9, 4, 1, 0, 1, 4, 9, 4, 1, 0, 1, 4, 9, 4, 1, 0, 1, 4, 9, 4
Offset: 0

Views

Author

N. J. A. Sloane, May 12 2002

Keywords

Comments

Period 6: repeat [0,1,4,9,4,1].
Occurs in Mariotte reference, pp. 511-512. Consider waterjets of heights 0,5,10, ... = A008587 up to 100 pieds (feet). a(n) is the difference in pouces (inches) between tank's heights (in feet and inches) and part in feet (0,5,10,15,21,..). Row with 0's is implicit. - Paul Curtz, Nov 18 2008
a(m*n) = a(m)*a(n) mod 12; a(6*n+k) = a(6*n-k) for k <= 6*n. - Reinhard Zumkeller, Apr 24 2009
n^z mod 12, if z even number. Example: n^180 mod 12. etc... - Zerinvary Lajos, Nov 06 2009
Equivalently: n^(2*m + 2) mod 12. - G. C. Greubel, Apr 01 2016

References

  • Edme Mariotte, Règles pour les jets d'eau, pp. 508-518. In Divers ouvrages de mathématique et de physique par Messieurs de l'Académie Royale des Sciences, 6, 518, 1 p., Paris, 1693. Edme Mariotte (1620-1684) is known for the perfect gas law (1676, Essai sur l'air), but later than Robert Boyle (1662). - Paul Curtz, Nov 18 2008

Crossrefs

Programs

Formula

G.f.: x*(1 + 4*x + 9*x^2 + 4*x^3 + x^4)/((1 - x)*(1 + x)*(1 + x + x^2)*(1 - x + x^2)). - R. J. Mathar, Jul 23 2009
a(n) = (1/6)*(19 - 3*(-1)^n - 24*cos(n*Pi/3) + 8*cos(2*n*Pi/3)). - G. C. Greubel, Apr 01 2016
a(n) = A260686(n)^2. - Wesley Ivan Hurt, Apr 01 2016

Extensions

Incorrect g.f. removed by Georg Fischer, May 15 2019

A367360 Comma transform of squares.

Original entry on oeis.org

1, 14, 49, 91, 62, 53, 64, 96, 48, 11, 1, 11, 41, 91, 62, 52, 62, 93, 43, 14, 4, 14, 45, 95, 66, 56, 67, 97, 48, 19, 9, 11, 41, 91, 61, 51, 61, 91, 41, 11, 1, 11, 41, 91, 62, 52, 62, 92, 42, 12, 2, 12, 42, 92, 63, 53, 63, 93, 43, 13, 3, 13, 43, 94, 64, 54, 64, 94, 44, 14, 5, 15, 45, 95, 65, 55, 65, 96, 46, 16, 6, 16, 46, 97
Offset: 0

Views

Author

N. J. A. Sloane, Nov 22 2023

Keywords

Comments

To compute the comma transform of a sequence [b,c,d,e,f,...], concatenate the last digit of each term with the first digit of the following term. In other words, these are the numbers formed by the pairs of digits that surround the commas that separate the terms of the original sequence.
The comma transform CT(S) of a sequence S of positive numbers maps S into the set F consisting of finite or infinite sequences of positive numbers each with one or two digits. The inverse comma transform CTi maps an element of F to an element of F.
Inspired by Eric Angelini's A121805.

Examples

			The squares are 0, 1, 4, 9, 16, 25, ..., so the comma transform is [0]1, 14, 49, 91, 62, ...
		

Crossrefs

A166499 is the comma transform of the primes, A367361 of the powers of 2, A367362 of the nonnegative integers. See also A368362.

Programs

  • Maple
    Maple code for comma transform (CT(a)) of a sequence a:
    # leading digit, from A000030
    Ldigit:=proc(n) local v; v:=convert(n, base, 10); v[-1]; end;
    CT:=proc(a) local b,i; b:=[];
    for i from 1 to nops(a)-1 do
    b := [op(b), 10*(a[i] mod 10) + Ldigit(a[i+1])]; od: b; end;
    # Inverse comma transform of sequence A calculated in base "bas": - N. J. A. Sloane, Jan 03 2024
    bas := 10;
    Ldigit:=proc(n) local v; v:=convert(n, base, bas); v[-1]; end;
    CTi := proc(A) local B,i,L,R;
    for i from 1 to nops(A) do
       if A[i]>=bas^2 then error("all terms must have 1 or 2 digits"); fi; od:
    B:=Array(1..nops(A),-1);
    if A[1] >= bas then B[1]:= Ldigit(A[1]); L:=(A[1] mod bas);
    else B[1]:=10; L:=A[1];
    fi;
    for i from 2 to nops(A) do
      if A[i] >= bas then R := Ldigit(A[i]) else R:=0; fi;
      B[i] := L*bas + R;
      L := (A[i] mod bas);
    od;
    B;
    end;
    # second Maple program:
    a:= n-> parse(cat(""||(n^2)[-1],""||((n+1)^2)[1])):
    seq(a(n), n=0..99);  # Alois P. Heinz, Nov 22 2023
  • Mathematica
    a[n_]:=FromDigits[{Last[IntegerDigits[n^2]],First[IntegerDigits[(n+1)^2]]}];
    a/@Range[0,83] (* Ivan N. Ianakiev, Nov 24 2023 *)
  • Python
    from itertools import count, islice, pairwise
    def S(): yield from (str(i**2) for i in count(0))
    def agen(): yield from (int(t[-1]+u[0]) for t, u in pairwise(S()))
    print(list(islice(agen(), 84))) # Michael S. Branicky, Nov 22 2023
    
  • Python
    def A367360(n): return (0, 10, 40, 90, 60, 50, 60, 90, 40, 10)[n%10]+int(str((n+1)**2)[0]) # Chai Wah Wu, Dec 22 2023

Formula

a(n) = 10 * A008959(n) + A002993(n+1). - Alois P. Heinz, Nov 22 2023

A070442 a(n) = n^2 mod 20.

Original entry on oeis.org

0, 1, 4, 9, 16, 5, 16, 9, 4, 1, 0, 1, 4, 9, 16, 5, 16, 9, 4, 1, 0, 1, 4, 9, 16, 5, 16, 9, 4, 1, 0, 1, 4, 9, 16, 5, 16, 9, 4, 1, 0, 1, 4, 9, 16, 5, 16, 9, 4, 1, 0, 1, 4, 9, 16, 5, 16, 9, 4, 1, 0, 1, 4, 9, 16, 5, 16, 9, 4, 1, 0, 1, 4, 9, 16, 5, 16, 9, 4, 1, 0, 1, 4, 9, 16, 5, 16, 9, 4, 1, 0, 1, 4, 9, 16
Offset: 0

Views

Author

N. J. A. Sloane, May 12 2002

Keywords

Comments

Also, n^6 mod 20.
Equivalently n^10 mod 20. - Zerinvary Lajos, Oct 31 2009

Crossrefs

Programs

Formula

From Reinhard Zumkeller, Apr 24 2009: (Start)
a(m*n) = a(m)*a(n) mod 20.
a(5*n+k) = a(5*n-k) for k <= 5*n.
a(n+10) = a(n). (End)
G.f. -x*(1+4*x+9*x^2+16*x^3+5*x^4+16*x^5+9*x^6+4*x^7+x^8) / ( (x-1) *(1+x) *(x^4+x^3+x^2+x+1) *(x^4-x^3+x^2-x+1) ). - R. J. Mathar, Aug 27 2013

A070438 a(n) = n^2 mod 15.

Original entry on oeis.org

0, 1, 4, 9, 1, 10, 6, 4, 4, 6, 10, 1, 9, 4, 1, 0, 1, 4, 9, 1, 10, 6, 4, 4, 6, 10, 1, 9, 4, 1, 0, 1, 4, 9, 1, 10, 6, 4, 4, 6, 10, 1, 9, 4, 1, 0, 1, 4, 9, 1, 10, 6, 4, 4, 6, 10, 1, 9, 4, 1, 0, 1, 4, 9, 1, 10, 6, 4, 4, 6, 10, 1, 9, 4, 1, 0, 1, 4, 9, 1, 10, 6, 4, 4, 6, 10, 1, 9, 4, 1, 0, 1, 4, 9, 1, 10, 6
Offset: 0

Views

Author

N. J. A. Sloane, May 12 2002

Keywords

Comments

Equivalently, n^6 mod 15. - Ray Chandler, Dec 27 2023

Crossrefs

Programs

Formula

From Reinhard Zumkeller, Apr 24 2009: (Start)
a(m*n) = a(m)*a(n) mod 15.
a(15*n+7+k) = a(15*n+8-k) for k <= 15*n+7.
a(15*n+k) = a(15*n-k) for k <= 15*n.
a(n+15) = a(n). (End)
From R. J. Mathar, Mar 14 2011: (Start)
a(n) = a(n-15).
G.f.: -x*(1+x) *(x^12+3*x^11+6*x^10-5*x^9+15*x^8-9*x^7+13*x^6-9*x^5+15*x^4-5*x^3+6*x^2+3*x+1) / ( (x-1) *(1+x^4+x^3+x^2+x) *(1+x+x^2) *(1-x+x^3-x^4+x^5-x^7+x^8) ). (End)
G.f.: (x^14 +4*x^13 +9*x^12 +x^11 +10*x^10 +6*x^9 +4*x^8 +4*x^7 +6*x^6 +10*x^5 +x^4 +9*x^3 +4*x^2 +x)/(-x^15 +1). - Colin Barker, Aug 14 2012

A070452 a(n) = n^2 mod 30.

Original entry on oeis.org

0, 1, 4, 9, 16, 25, 6, 19, 4, 21, 10, 1, 24, 19, 16, 15, 16, 19, 24, 1, 10, 21, 4, 19, 6, 25, 16, 9, 4, 1, 0, 1, 4, 9, 16, 25, 6, 19, 4, 21, 10, 1, 24, 19, 16, 15, 16, 19, 24, 1, 10, 21, 4, 19, 6, 25, 16, 9, 4, 1, 0, 1, 4, 9, 16, 25, 6, 19, 4, 21, 10, 1, 24, 19, 16, 15, 16, 19, 24, 1
Offset: 0

Views

Author

N. J. A. Sloane, May 12 2002

Keywords

Comments

Equivalently, n^6 mod 30. - Ray Chandler, Dec 27 2023

Crossrefs

Programs

  • Mathematica
    Table[Mod[n^2,30],{n,0,200}] (* Vladimir Joseph Stephan Orlovsky, Apr 27 2011 *)
    LinearRecurrence[{-1, 0, 1, 1, 0, -1, -1, 0, 1, 1, 0, -1, -1, 0, 1, 1, 0, -1, -1, 0, 1, 1, 0, -1, -1, 0, 1, 1},{0, 1, 4, 9, 16, 25, 6, 19, 4, 21, 10, 1, 24, 19, 16, 15, 16, 19, 24, 1, 10, 21, 4, 19, 6, 25, 16, 9},80] (* Ray Chandler, Aug 26 2015 *)
    PowerMod[Range[0,80],6,30] (* or *) PadRight[{},80,{0,1,4,9,16,25,6,19,4,21,10,1,24,19,16,15,16,19,24,1,10,21,4,19,6,25,16,9,4,1}] (* Harvey P. Dale, Jul 10 2023 *)
  • PARI
    a(n)=n^2%30 \\ Charles R Greathouse IV, Oct 07 2015
  • Sage
    [power_mod(n,2,30)for n in range(0, 75)] # Zerinvary Lajos, Nov 03 2009
    

Formula

From Reinhard Zumkeller, Apr 24 2009: (Start)
a(m*n) = a(m)*a(n) mod 30.
a(15*n+k) = a(15*n-k) for k<=15*n.
a(n+30) = a(n). (End)
a(n)= -a(n-1) +a(n-3) +a(n-4) -a(n-6) -a(n-7) +a(n-9) +a(n-10) -a(n-12) -a(n-13) +a(n-15) +a(n-16) -a(n-18) -a(n-19) +a(n-21) +a(n-22) -a(n-24) -a(n-25) +a(n-27) +a(n-28). - R. J. Mathar, Jul 23 2009

A159852 n^2 mod 60.

Original entry on oeis.org

0, 1, 4, 9, 16, 25, 36, 49, 4, 21, 40, 1, 24, 49, 16, 45, 16, 49, 24, 1, 40, 21, 4, 49, 36, 25, 16, 9, 4, 1, 0, 1, 4, 9, 16, 25, 36, 49, 4, 21, 40, 1, 24, 49, 16, 45, 16, 49, 24, 1, 40, 21, 4, 49, 36, 25, 16, 9, 4, 1, 0, 1, 4, 9, 16, 25, 36, 49, 4, 21, 40, 1, 24, 49, 16, 45, 16, 49, 24, 1
Offset: 0

Views

Author

Reinhard Zumkeller, Apr 24 2009

Keywords

Comments

Periodic with period 30: a(n+30) = a(n);
a(15*n+k) = a(15*n-k) for k<=15*n;
a(m*n) = a(m)*a(n) mod 60;
A010421 gives the range of this sequence.

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1},{0, 1, 4, 9, 16, 25, 36, 49, 4, 21, 40, 1, 24, 49, 16, 45, 16, 49, 24, 1, 40, 21, 4, 49, 36, 25, 16, 9, 4, 1},80] (* Ray Chandler, Aug 26 2015 *)
    PowerMod[Range[0,80],2,60] (* or *) PadRight[{},80,{0,1,4,9,16,25,36,49,4,21,40,1,24,49,16,45,16,49,24,1,40,21,4,49,36,25,16,9,4,1}] (* Harvey P. Dale, Jun 19 2018 *)
  • PARI
    a(n)=n^2%60 \\ Charles R Greathouse IV, May 09 2013
Showing 1-10 of 19 results. Next