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 13 results. Next

A372523 Triangle read by rows: T(n, k) is equal to n/k if k | n, else to the concatenation of A003988(n, k) = floor(n/k) and A051127(k, n) = n mod k.

Original entry on oeis.org

1, 2, 1, 3, 11, 1, 4, 2, 11, 1, 5, 21, 12, 11, 1, 6, 3, 2, 12, 11, 1, 7, 31, 21, 13, 12, 11, 1, 8, 4, 22, 2, 13, 12, 11, 1, 9, 41, 3, 21, 14, 13, 12, 11, 1, 10, 5, 31, 22, 2, 14, 13, 12, 11, 1, 11, 51, 32, 23, 21, 15, 14, 13, 12, 11, 1, 12, 6, 4, 3, 22, 2, 15, 14, 13, 12, 11, 1
Offset: 1

Views

Author

Stefano Spezia, May 04 2024

Keywords

Examples

			The triangle begins:
  1;
  2,  1;
  3, 11,  1;
  4,  2, 11,  1;
  5, 21, 12, 11,  1;
  6,  3,  2, 12, 11,  1;
  7, 31, 21, 13, 12, 11, 1;
  ...
		

Crossrefs

Cf. A000012 (right diagonal), A000027 (1st column).

Programs

  • Mathematica
    T[n_,k_]:=If[Divisible[n,k],n/k,FromDigits[Join[IntegerDigits[Floor[n/k]],IntegerDigits[Mod[n,k]]]]]; Table[T[n,k],{n,12},{k,n}]//Flatten (* or *)
    T[n_,k_]:=Floor[n/k]10^IntegerLength[Mod[n,k]]+Mod[n,k]; Table[T[n,k],{n,12},{k,n}]//Flatten (* or *)
    T[n_, k_]:=SeriesCoefficient[x^k(1+Sum[(i + 10^(1+Floor[Log10[Mod[n,k]]]))*x^i, {i, k-1}] - Sum[i*x^(k+i), {i, k-1}])/(1-x^k)^2, {x, 0, n}]; Table[T[n, k], {n, 12}, {k, n}]//Flatten

Formula

T(n, k) = floor(n/k)*10^(1+floor(log10(n mod k))) + (n mod k) if n is not divisible by k.
T(n, n) = 1.
T(n, 1) = n.
T(n, k) = 2*T(n-k, k) - T(n-2*k, k) for n >= 3*k.
T(n, k) = [x^n] x^k*(1 + (Sum_{i=1..k-1} (i + 10^(1+floor(log10(n mod k))))*x^i) - (Sum_{i=1..k-1} i*x^(k+i)))/(1 - x^k)^2.

A004125 Sum of remainders of n mod k, for k = 1, 2, 3, ..., n.

Original entry on oeis.org

0, 0, 1, 1, 4, 3, 8, 8, 12, 13, 22, 17, 28, 31, 36, 36, 51, 47, 64, 61, 70, 77, 98, 85, 103, 112, 125, 124, 151, 138, 167, 167, 184, 197, 218, 198, 233, 248, 269, 258, 297, 284, 325, 328, 339, 358, 403, 374, 414, 420, 449, 454, 505, 492, 529, 520, 553, 578, 635, 586, 645, 672
Offset: 1

Views

Author

Keywords

Comments

Row sums of A051778, A048158. Antidiagonal sums of A051127. - L. Edson Jeffery, Mar 03 2012
Let u_m(n) = Sum_{k=1..n} (n^m mod k^m) with m integer. As n-->+oo, u_m(n) ~ (n^(m+1))*(1-(1/(m+1))*Zeta(1+1/m)). Proof: using Riemann sums, we have u_m(n) ~ (n^(m+1))*int(((1/x)[nonascii character here])*(1-floor(x^m)/(x^m)),x=1..+oo) and the result follows. - Yalcin Aktar, Jul 30 2008 [x is the real variable of integration. The nonascii character (which was illegible in the original message) is probably some form of multiplication sign. I suggest that we leave it the way it is for now. - N. J. A. Sloane, Dec 07 2014]
Also the alternating row sums of A236112. - Omar E. Pol, Jan 26 2014
If n is prime then a(n) = a(n-1) + n - 2. - Omar E. Pol, Mar 19 2014
If n is a power of 2 greater than 1, then a(n) = a(n-1). - David Morales Marciel, Oct 21 2015
It appears that if n is an even perfect number, then a(n) = a(n-1) - 1. - Omar E. Pol, Oct 21 2015
Partial sums of A235796. - Omar E. Pol, Jun 26 2016
Aside from a(n) = a(n-1) for n = 2^m, the only values appearing more than once among the first 6*10^8 terms are those at n = 38184 +- 1, 458010 +- 1, 776112 +- 1, 65675408 +- 1, and 113393280 +- 2. - Trevor Cappallo, Jun 07 2021
The off-by-1 terms in the comment above are the terms of A068077. Proof: If a(n-1) = a(n+1), then (n-1)^2 - Sum_{k=1..n-1} sigma(k) = (n+1)^2 - Sum_{k=1..n+1} sigma(k) via the formula; rearranging terms gives sigma(n)+sigma(n+1)=4n. - Lewis Chen, Sep 24 2021

Examples

			a(5) = 4. The remainder when 5 is divided by 2,3,4 respectively is 1,2,1 and their sum = 4.
		

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A000290, A006218, A023196, A048158, A050482, A051778, A120444 (first differences).

Programs

  • GAP
    List([1..70],n->n^2-Sum([1..n],k->Sigma(k))); # Muniru A Asiru, Mar 28 2018
    
  • Haskell
    a004125 n = sum $ map (mod n) [1..n]
    -- Reinhard Zumkeller, Jan 28 2011
    
  • Magma
    [&+[n mod r: r in [1..n]]: n in [1..70]]; // Bruno Berselli, Jul 06 2014
    
  • Maple
    A004125 := n -> add( modp(n,k), k=2..n); /* much faster and unambiguous; "a mod b" may be mods(a,b) */ # M. F. Hasler, Nov 22 2007
  • Mathematica
    Table[Sum[Mod[n,k],{k,2,n-1}],{n,70}] (* Harvey P. Dale, Nov 23 2011 *)
    Accumulate[Table[2n-1-DivisorSigma[1,n],{n,70}]] (* Harvey P. Dale, Jul 11 2014 *)
  • PARI
    A004125(n)=sum(k=2,n,n%k) \\ M. F. Hasler, Nov 22 2007
    
  • Python
    def a(n): return sum(n%k for k in range(1, n))
    print([a(n) for n in range(1, 63)]) # Michael S. Branicky, Jun 08 2021
    
  • Python
    from math import isqrt
    def A004125(n): return n**2+((s:=isqrt(n))**2*(s+1)-sum((q:=n//k)*((k<<1)+q+1) for k in range(1,s+1))>>1) # Chai Wah Wu, Oct 21 2023
    
  • SageMath
    def a(n): return sum(n.mod(k) for k in (1..n))
    print([a(n) for n in (1..62)])  # Peter Luschny, May 12 2025

Formula

a(n) = n^2 - Sum_{k=1..n} sigma(k) = A000290(n) - A024916(n), hence asymptotically a(n) = n^2*(1-Pi^2/12) + O(n*log(n)^(2/3)). - Benoit Cloitre, Apr 28 2002. Asymptotics corrected/improved by Charles R Greathouse IV, Feb 22 2015
a(n) = A008805(n-3) + A049798(n-1), for n > 2. - Carl Najafi, Jan 31 2013
a(n) = A000217(n-1) - A153485(n). - Omar E. Pol, Jan 28 2014
G.f.: x^2/(1-x)^3 - (1-x)^(-1) * Sum_{k>=1} k*x^(2*k)/(1-x^k). - Robert Israel, Aug 13 2015
a(n) = Sum_{i=1..n} (n mod i). - Wesley Ivan Hurt, Sep 15 2017
From Ridouane Oudra, May 12 2025: (Start)
a(n) = A067439(n) + A072514(n).
a(n) = Sum_{d|n} d*A067439(n/d).
a(p) = A067439(p), for p prime.
a(p^k) = A072514(p^(k+1))/p, for p prime and k >= 0. (End)
a(n) = A111490(n) - n. - Peter Luschny, May 12 2025

Extensions

Edited by M. F. Hasler, Apr 18 2015

A048158 Triangular array T read by rows: T(n,k) = n mod k, for k=1,2,...,n, n=1,2,...

Original entry on oeis.org

0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 2, 1, 0, 0, 0, 0, 2, 1, 0, 0, 1, 1, 3, 2, 1, 0, 0, 0, 2, 0, 3, 2, 1, 0, 0, 1, 0, 1, 4, 3, 2, 1, 0, 0, 0, 1, 2, 0, 4, 3, 2, 1, 0, 0, 1, 2, 3, 1, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 2, 0, 5, 4, 3, 2, 1, 0, 0, 1, 1, 1, 3, 1, 6, 5, 4, 3, 2, 1, 0, 0, 0, 2, 2, 4, 2, 0, 6, 5, 4, 3, 2, 1, 0
Offset: 1

Views

Author

Keywords

Comments

Also, rectangular array read by antidiagonals: a(n, k) = n mod k, n >= 0, k >= 1. Cf. A051126, A051127, A051777. - David Wasserman, Oct 01 2008

Examples

			Triangle begins
  0;
  0  0;
  0  1  0;
  0  0  1  0;
  0  1  2  1  0;
  0  0  0  2  1  0;
  0  1  1  3  2  1  0;
  0  0  2  0  3  2  1  0;
  0  1  0  1  4  3  2  1  0;
  0  0  1  2  0  4  3  2  1  0;
  0  1  2  3  1  5  4  3  2  1  0;
  0  0  0  0  2  0  5  4  3  2  1  0;
  ...
From _Omar E. Pol_, Feb 21 2014: (Start)
Illustration of the 12th row of triangle:
-----------------------------------
.      k: 1 2 3 4 5 6 7 8 9 10..12
-----------------------------------
.         _ _ _ _ _ _ _ _ _ _ _ _
.        |_| | | | | | | | | | | |
.        |_|_| | | | | | | | | | |
.        |_| |_| | | | | | | | | |
.        |_|_| |_| | | | | | | | |
.        |_| | | |_| | | | | | | |
.        |_|_|_| | |_| | | | | | |
.        |_| | | | | |_| | | | | |
.        |_|_| |_| | |*|_| | | | |
.        |_| |_| | | |* *|_| | | |
.        |_|_| | |_| |* * *|_| | |
.        |_| | | |*| |* * * *|_| |
.        |_|_|_|_|*|_|* * * * *|_|
.
Row 12 is 0 0 0 0 2 0 5 4 3 2 1 0
(End)
		

Crossrefs

Row sums are given by A004125.
Cf. A002260.

Programs

  • Haskell
    a048158 = mod
    a048158_row n = a048158_tabl !! (n-1)
    a048158_tabl = zipWith (map . mod) [1..] a002260_tabl
    -- Reinhard Zumkeller, Apr 29 2015, Jan 20 2014 (fixed), Aug 13 2013
    
  • Maple
    T:= (n, k)-> modp(n, k):
    seq(seq(T(n, k), k=1..n), n=1..20); # Alois P. Heinz, Apr 04 2012
  • Mathematica
    Flatten[Table[Mod[n, Range[n]], {n, 15}]]
  • Python
    def A048158_T(n,k): return n%k # Chai Wah Wu, May 13 2024

Formula

A051731(n,k) = A000007(T(n,k)). - Reinhard Zumkeller, Nov 01 2009
T(n,k) = n - k*A010766(n,k). - Mats Granvik, Gary W. Adamson, Feb 20 2010
G.f. for the k-th column: x^(k+1)*Sum_{i=0..k-2} (i + 1)*x^i/(1 - x^k). - Stefano Spezia, May 08 2024

Extensions

More terms from David Wasserman, Oct 01 2008

A051126 Table T(n,k) = n mod k read by downward antidiagonals (n >= 1, k >= 1).

Original entry on oeis.org

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

Views

Author

Keywords

Examples

			Table begins in row n=1:
  0  1  1  1  1  1  1  1  1  1 ...
  0  0  2  2  2  2  2  2  2  2 ...
  0  1  0  3  3  3  3  3  3  3 ...
  0  0  1  0  4  4  4  4  4  4 ...
  0  1  2  1  0  5  5  5  5  5 ...
  0  0  0  2  1  0  6  6  6  6 ...
  0  1  1  3  2  1  0  7  7  7 ...
  0  0  2  0  3  2  1  0  8  8 ...
  0  1  0  1  4  3  2  1  0  9 ...
  0  0  1  2  0  4  3  2  1  0 ...
  0  1  2  3  1  5  4  3  2  1 ...
  0  0  0  0  2  0  5  4  3  2 ...
  0  1  1  1  3  1  6  5  4  3 ...
		

Crossrefs

Programs

  • Mathematica
    TableForm[Table[Mod[n, k], {n, 1, 16}, {k, 1, 16}]] (* A051126 array *)
    Table[Mod[n - k + 1, k], {n, 16}, {k, n, 1, -1}] // Flatten  (* A051126 sequence *)
    (* Clark Kimberling, Feb 04 2016 *)

Formula

As a linear array, the sequence is a(n) = A002260(n) mod A004736 (n) or a(n) = (n-(t*(t+1)/2)) mod ((t*t+3*t+4)/2-n), where t = floor((-1+sqrt(8*n-7))/2). - Boris Putievskiy, Dec 19 2012
G.f. of the k-th column: x*Sum_{i=0..k-2} (i + 1)*x^i/(1 - x^k). - Stefano Spezia, May 08 2024

Extensions

More terms from James Sellers, Dec 11 1999

A051778 Triangle read by rows, where row (n) = n mod (n-1), n mod (n-2), n mod (n-3), ...n mod 2.

Original entry on oeis.org

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

Views

Author

Asher Auel, Dec 09 1999

Keywords

Comments

Central terms: a(2*n+1,n) = n for n > 0. - Reinhard Zumkeller, Dec 03 2014
Deleting column 1 of the array at A051126 gives the array A051778 in square format (see Example). - Clark Kimberling, Feb 04 2016

Examples

			row (7) = 7 mod 6, 7 mod 5, 7 mod 4, 7 mod 3, 7 mod 2 = 1, 2, 3, 1, 1.
1;
1  0 ;
1  2  1 ;
1  2  0  0 ;
1  2  3  1  1 ;
1  2  3  0  2  0 ;
1  2  3  4  1  0  1 ;
1  2  3  4  0  2  1  0 ;
1  2  3  4  5  1  3  2  1 ;
1  2  3  4  5  0  2  0  0  0 ;
1  2  3  4  5  6  1  3  1  1  1 ;
Northwest corner of square array:
1 1 1 1 1 1 1 1 1 1 1
0 2 2 2 2 2 2 2 2 2 2
1 0 3 3 3 3 3 3 3 3 3
0 1 0 4 4 4 4 4 4 4 4
1 2 1 0 5 5 5 5 5 5 5
0 0 2 1 0 6 6 6 6 6 6
1 1 3 2 1 0 7 7 7 7 7
- _Clark Kimberling_, Feb 04 2016
		

Crossrefs

Cf. A004125 (row sums), A000027 (central terms), A049820 (number of nonzeros per row), A032741 (number of ones per row), A070824 (number of zeros per row).

Programs

  • Haskell
    a051778 n k = a051778_tabl !! (n-3) !! (k-1)
    a051778_row n = a051778_tabl !! (n-3)
    a051778_tabl = map (\xs -> map (mod (head xs + 1)) xs) $
                       iterate (\xs -> (head xs + 1) : xs) [2]
    -- Reinhard Zumkeller, Dec 03 2014
  • Mathematica
    Flatten[Table[Mod[n,i],{n,3,20},{i,n-1,2,-1}]] (* Harvey P. Dale, Sep 09 2012 *)
    TableForm[Table[Mod[n, k], {n, 1, 12}, {k, 2, 12}]] (* square *)
    (* Clark Kimberling, Feb 04 2016 *)

A051777 Triangle read by rows, where row (n) = n mod n, n mod (n-1), n mod (n-2), ...n mod 1.

Original entry on oeis.org

0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 2, 1, 0, 0, 1, 2, 0, 0, 0, 0, 1, 2, 3, 1, 1, 0, 0, 1, 2, 3, 0, 2, 0, 0, 0, 1, 2, 3, 4, 1, 0, 1, 0, 0, 1, 2, 3, 4, 0, 2, 1, 0, 0, 0, 1, 2, 3, 4, 5, 1, 3, 2, 1, 0, 0, 1, 2, 3, 4, 5, 0, 2, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 1, 3, 1, 1, 1, 0, 0, 1, 2, 3, 4, 5, 6, 0, 2, 4, 2, 2, 0, 0
Offset: 1

Views

Author

Asher Auel, Dec 09 1999

Keywords

Comments

Also, rectangular array read by antidiagonals, a(n, k) = k mod n (k >= 0, n >= 1). Cf. A048158, A051127. - David Wasserman, Oct 01 2008
Central terms: a(2*n - 1, n) = n - 1. - Reinhard Zumkeller, Jan 25 2011

Examples

			row (5) = 5 mod 5, 5 mod 4, 5 mod 3, 5 mod 2, 5 mod 1 = 0, 1, 2, 1, 0.
0 ;
0  0 ;
0  1  0 ;
0  1  0  0 ;
0  1  2  1  0;
0  1  2  0  0  0 ;
0  1  2  3  1  1  0 ;
0  1  2  3  0  2  0  0;
0  1  2  3  4  1  0  1  0 ;
0  1  2  3  4  0  2  1  0  0 ;
0  1  2  3  4  5  1  3  2  1  0 ;
0  1  2  3  4  5  0  2  0  0  0  0 ;
0  1  2  3  4  5  6  1  3  1  1  1  0 ;
		

Crossrefs

Cf. A051778. Row sums give A004125. Number of 0's in row n gives A000005 (tau(n)). Number of 1's in row n+1 gives A032741(n).

Programs

  • Haskell
    a051777 n k = a051777_row n !! (k-1)
    a051777_row n = map (mod n) [n, n-1 .. 1]
    a051777_tabl = map a051777_row [1..]
    -- Reinhard Zumkeller, Jan 25 2011
  • Mathematica
    Flatten[Table[Mod[n,Range[n,1,-1]],{n,20}]] (* Harvey P. Dale, Nov 30 2011 *)

A062169 Triangle T(n, k) = k! mod n for n >= 1, 1 <= k <= n.

Original entry on oeis.org

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

Views

Author

Henry Bottomley, Jun 11 2001

Keywords

Examples

			a(7,4) = 4! mod 7 = 24 mod 7 = 3. Rows are:
0;
1,0;
1,2,0;
1,2,2,0;
1,2,1,4,0;
1,2,0,0,0,0;
1,2,6,3,1,6,0;
1,2,6,0,0,0,0,0;
1,2,6,6,3,0,0,0,0;
1,2,6,4,0,0,0,0,0,0;
		

Crossrefs

First zero in each row is when k=A002034. Maximum value in each row is A062170. Number of distinct values in each row is A038203. Cf. A000142, A048158, A051127.

Programs

  • Mathematica
    Table[Mod[Range[n]!, n], {n, 1, 15}] // Flatten (* Jean-François Alcover, Oct 25 2013 *)
  • PARI
    { n=0; for (k=1, 50, for (m=1, k, write("b062169.txt", n++, " ", m!%k)) ) } \\ Harry J. Smith, Aug 02 2009

Extensions

Definition amended by Georg Fischer, Oct 27 2021

A154585 a(n) = abs(Sum_{k=1..n} (-1)^k * (n-k+1 mod k)).

Original entry on oeis.org

0, 1, 1, 0, 1, 2, 4, 0, 3, 4, 5, 4, 1, 10, 4, 3, 1, 2, 9, 2, 11, 12, 17, 11, 0, 13, 0, 1, 6, 7, 23, 8, 7, 20, 10, 9, 8, 25, 14, 13, 4, 3, 20, 13, 34, 35, 34, 26, 8, 13, 6, 5, 8, 25, 24, 1, 26, 27, 34, 33, 4, 37, 25, 6, 11, 12, 11, 16, 37, 38, 60, 59, 24, 25, 0, 19, 40, 41, 54, 14, 25, 26, 51
Offset: 1

Views

Author

Keywords

Examples

			a(5) = -(5 mod 1)+(4 mod 2)-(3 mod 3)+(2 mod 4)-(1 mod 5) = -0+0-0+2-1 = 1.
		

Crossrefs

Programs

  • Maple
    P:=proc(i) local a,n; for n from 1 by 1 to i do a:=abs(sum('(-1)^k*((n-k+1) mod k)','k'=1..n)); print(a); od; end: P(100);
  • Mathematica
    a[n_] := Abs @ Sum[(-1)^k * Mod[n - k + 1, k], {k, 1, n}]; Array[a, 100] (* Amiram Eldar, Sep 18 2021 *)
  • PARI
    a(n) = abs(sum(k=1, n, (-1)^k * lift(Mod(n-k+1, k)))); \\ Michel Marcus, Sep 18 2021

A068906 Square array read by ascending antidiagonals of partitions of k modulo n.

Original entry on oeis.org

0, 0, 1, 0, 0, 1, 0, 1, 2, 1, 0, 1, 0, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 1, 1, 3, 2, 1, 0, 1, 2, 3, 0, 3, 2, 1, 0, 0, 0, 3, 2, 5, 3, 2, 1, 0, 0, 1, 3, 1, 1, 5, 3, 2, 1, 0, 0, 0, 2, 0, 5, 0, 5, 3, 2, 1, 0, 0, 0, 2, 2, 3, 4, 7, 5, 3, 2, 1, 0, 1, 2, 2, 0, 4, 1, 3, 7, 5, 3, 2, 1, 0, 1, 2, 0, 2, 0, 1, 7, 2, 7, 5, 3, 2, 1
Offset: 1

Views

Author

Henry Bottomley, Mar 05 2002

Keywords

Comments

0 is disproportionately common modulo 5, 7 and 11, largely because T(5,5m+4)=T(7,7m+5)=T(11,11m+6)=0.

Examples

			Rows start 0,0,0,0,0,...; 1,0,1,1,1,...; 1,2,0,2,1,...; 1,2,3,1,3,...; 1,2,3,0,2,1,...; 1,2,3,5,1,5,...; 1,2,3,5,0,...; 1,2,3,5,7,...; etc.
		

Crossrefs

Rows 2, 3, 5, 7 and 11 give A040051, A068907, A068908, A068909, A020919.

Formula

T(n, k) =A051127(n, A000041(k))

A324472 a(n) = 1000 mod n.

Original entry on oeis.org

0, 0, 1, 0, 0, 4, 6, 0, 1, 0, 10, 4, 12, 6, 10, 8, 14, 10, 12, 0, 13, 10, 11, 16, 0, 12, 1, 20, 14, 10, 8, 8, 10, 14, 20, 28, 1, 12, 25, 0, 16, 34, 11, 32, 10, 34, 13, 40, 20, 0, 31, 12, 46, 28, 10, 48, 31, 14, 56, 40, 24, 8, 55, 40, 25, 10, 62, 48, 34, 20, 6, 64, 51, 38, 25, 12, 76
Offset: 1

Views

Author

N. J. A. Sloane, Mar 07 2019, following a suggestion from Charles Kusniec

Keywords

Examples

			a(98) = 1000 mod 98 = 20 as 1000 = 98 * 10 + 20. - _David A. Corneth_, Mar 07 2019
		

Crossrefs

Programs

Formula

a(n) = 1000 for n >= 1001.
a(n) = 0 <=> n in { A018767 }.
a(n) = 1 <=> n > 1 and n in { A018766 }.
Showing 1-10 of 13 results. Next