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.

Previous Showing 11-20 of 25 results. Next

A158041 Determinant of power series of gamma matrix with determinant 3!.

Original entry on oeis.org

6, 372, 8862, 148800, 2096886, 26922756, 332847654, 4138425600, 53260806102, 715168132932, 9918365312598, 139707565435200, 1971543518031366, 27670255890476676, 385457279875640742, 5335884957031756800, 73579514340980051958, 1013129779240735463748
Offset: 1

Views

Author

Keywords

Comments

a(n) = Determinant(A + A^2 + A^3 + A^4 + A^5 + ... + A^n) where A is the submatrix A(1..4,1..4) of the matrix with factorial determinant A= [[1,1,1,1,1,1,...], [1,2,1,2,1,2,...], [1,2,3,1,2,3,...],[1,2,3,4,1,2,...], [1,2,3,4,5,1,...], [1,2,3,4,5,6,...],...]; note: Determinant A(1..n,1..n) = (n-1)!.

Examples

			a(1) = Determinant(A) = 3! = 6.
		

References

  • G. Balzarotti and P. P. Lava, Le sequenze di numeri interi, Hoepli, 2008.

Crossrefs

Programs

  • Maple
    with(LinearAlgebra):
    A:= <<1|1|1|1>, <1|2|1|2>, <1|2|3|1>, <1|2|3|4>>:
    seq(Determinant(add(A^i, i=1..n)), n=1..30);
  • PARI
    vector(100, n, matdet(sum(k=1, n, [1,1,1,1 ; 1,2,1,2 ; 1,2,3,1 ; 1,2,3,4]^k))) \\ Colin Barker, Jul 13 2014

Formula

Empirical g.f.: -6*x*(6*x^2 -1)*(46656*x^12 -828144*x^10 +2517696*x^9 -3533544*x^8 +2852496*x^7 -1444952*x^6 +475416*x^5 -98154*x^4 +11656*x^3 -639*x^2 +1) / ((x -1)*(6*x -1)*(6*x^4 -22*x^3 +23*x^2 -10*x +1)*(216*x^4 -360*x^3 +138*x^2 -22*x +1)*(216*x^6 -828*x^5 +1284*x^4 -808*x^3 +214*x^2 -23*x +1)). - Colin Barker, Jul 13 2014

Extensions

More terms, and offset changed to 1 by Colin Barker, Jul 13 2014

A072514 Sum of n mod k for k in {1...n} with gcd(k,n) > 1.

Original entry on oeis.org

0, 0, 0, 0, 0, 2, 0, 2, 3, 8, 0, 9, 0, 16, 17, 16, 0, 27, 0, 31, 31, 44, 0, 52, 20, 56, 36, 69, 0, 92, 0, 72, 77, 102, 68, 127, 0, 128, 97, 152, 0, 192, 0, 165, 153, 196, 0, 230, 56, 231, 170, 237, 0, 319, 154, 290, 211, 302, 0, 421, 0, 334, 273, 334, 192, 478, 0, 411, 317
Offset: 1

Views

Author

Amarnath Murthy, Jul 30 2002

Keywords

Comments

Previous name was: Sum of the remainders when n is divided by unrelated numbers (numbers which are neither coprime to n nor divide n).

Examples

			a(18) = 27: the unrelated numbers to 18 are 4, 8, 10, 12, 14, 15 and 16. The remainders when 18 is divided by these numbers are 2, 2, 8, 6, 4, 3 and 2 whose sum is 27.
		

Crossrefs

Programs

  • Maple
    seq(add(n mod k, k=select(j->gcd(j,n)>1, [$1..n])),n=1..69); # Peter Luschny, Oct 01 2014
  • Mathematica
    snmk[n_]:=Total[Mod[n,Complement[Complement[Range[n],Divisors[n]], Select[ Range[n], CoprimeQ[ #,n]&]]]]; Array[snmk,70] (* Harvey P. Dale, Dec 09 2018 *)
  • PARI
    lista(nn) = vector(nn, n, sum(i=1, n, (n % i)*(gcd(n, i) != 1))); \\ Michel Marcus, Oct 01 2014

Formula

From Ridouane Oudra, May 14 2025: (Start)
a(n) = A004125(n) - A067439(n).
a(n) = Sum_{d|n, d>1} d*A067439(n/d).
a(p) = 0, for p prime.
a(p*q) = p*A067439(q) + q*A067439(p), for p and q two distinct prime numbers.
a(p^k) = p*A004125(p^(k-1)), for p a prime and k >= 0. (End)

Extensions

Corrected and extended by David Garber, Oct 22 2002
New name from Robert Israel, Oct 01 2014

A123327 a(n) = A000203(n) + A004125(n).

Original entry on oeis.org

1, 3, 5, 8, 10, 15, 16, 23, 25, 31, 34, 45, 42, 55, 60, 67, 69, 86, 84, 103, 102, 113, 122, 145, 134, 154, 165, 180, 181, 210, 199, 230, 232, 251, 266, 289, 271, 308, 325, 348, 339, 380, 369, 412, 417, 430, 451, 498, 471, 513, 521, 552, 559, 612, 601, 640, 633
Offset: 1

Views

Author

Paolo P. Lava and Giorgio Balzarotti, Sep 26 2006; Juri-Stepan Gerasimov, Jul 02 2009

Keywords

Comments

Another definition for this sequence: Let M be the matrix defined in A111490. Sequence gives M(1,1), M(1,2) + M(2,2), M(1,3) + M(2,3) + M(3,3), etc., i.e. a(n)= Sum_{i=1..n} M(i,n).
Proof from Hartmut F. W. Hoft, Feb 02 2014 that the two definitions agree: (Start)
For all n>=1 the following simplifications hold for the partial sums of the two sequences:
sum[1..n] a(k) = sum[1..n] A000203(k) + sum[1..n] A004125(k)
= A024916(n) + sum[1..n] A004125(k)
= n^2 + sum[1..n-1] A004125(k)
= sum[1..n] A123327(k).
An inductive argument then shows that the two definitions agree.
(End)

Examples

			1(=1+0), 3(=3+0), 5(=4+1), 8(=7+1), 10(=6+4), 15(=12+3), 16(=8+8), etc.
		

Crossrefs

Programs

  • Mathematica
    Lim=57;s2=Table[Sum[Mod[n, k], {k, 2, n-1}], {n, Lim}];Table[DivisorSigma[1, n]+s2[[n]],{n,Lim}] (* James C. McMahon, Nov 20 2024 *)
  • Python
    from math import isqrt
    def A123327(n): return n**2+((s:=isqrt(n-1))**2*(s+1)-sum((q:=(n-1)//k)*((k<<1)+q+1) for k in range(1,s+1))>>1) # Chai Wah Wu, Oct 22 2023

Formula

a(n) = A000290(n) - A024916(n-1), n > 1. - Omar E. Pol, Jan 29 2014

Extensions

Corrected (83 replaced by 103) by R. J. Mathar, May 21 2010
Edited by N. J. A. Sloane, Feb 02 2014, merging A162383 from Juri-Stepan Gerasimov with the present sequence. Thanks to Omar E. Pol for noticing the duplication.

A158042 Determinant of power series of gamma matrix with determinant 4!.

Original entry on oeis.org

24, 7200, 671832, 42120000, 2259461784, 116697218400, 6145075369464, 334042684560000, 18529848376972632, 1033842723079716000, 57545200744624079544, 3188945939520159000000, 176129265145080634433304
Offset: 0

Views

Author

Keywords

Comments

a(n) = Determinant(A + A^2 + A^3 + A^4 + A^5 + ... + A^n)
where A is the submtrix A(1..5,1..5) of the matrix with factorial determinant
A = [[1,1,1,1,1,1,...], [1,2,1,2,1,2,...], [1,2,3,1,2,3,...], [1,2,3,4,1,2,...], [1,2,3,4,5,1,...], [1,2,3,4,5,6,...], ...]; note: Determinant A(1..n,1..n) = (n-1)!.

Examples

			a(1) = Determinant(A) = 4! = 24.
		

References

  • G. Balzarotti and P. P. Lava, Le sequenze di numeri interi, Hoepli, 2008.

Crossrefs

Programs

  • Maple
    seq(Determinant(sum(A^i,i=1..n)),n=1..30);

A121406 a(1) = a(2) = 0; a(3) = 2; for n >= 4, a(n) = (prime(n-1)-2)*a(n-1), where prime(n) is the n-th prime.

Original entry on oeis.org

0, 0, 2, 6, 30, 270, 2970, 44550, 757350, 15904350, 429417450, 12453106050, 435858711750, 16998489758250, 696938080088250, 31362213603971250, 1599472893802533750, 91169954946744423750, 5379027341857921001250
Offset: 1

Views

Author

Dennis R. Martin (dennis.martin(AT)dptechnology.com), Jul 28 2006, Dec 05 2006

Keywords

Comments

Also number of distinct twin prime eliminations which can be attributed to a particular lowest prime factor prime(n) over primorial intervals of prime(n)#. That is, it is the number of composite numbers having prime(n) for their lowest prime factor within any interval of width prime(n)# starting after prime(n) which are adjacent to the center post of a twin prime candidate for which that twin prime candidate is not also eliminated by a prime factor less than prime(n). Or put simply, it is the number of twin prime eliminations by prime(n) within intervals of its primorial that are left after subtracting out the double eliminations that can be attributed to previous prime factors.
Sum_{ n >= 1 } a(n)/A002110(n) converges to 1/6. That is, (2 / 30) + (6 / 210) + (30 / 2310) + (270 / 30030) + (2970 / 510510) + ... = (1 / 6).

Examples

			The prime factors prime(1) = 2 and prime(2) = 3 cannot eliminate any twin prime candidates, therefore a(1) = a(2) = 0. The prime factor prime(3) = 5 will eliminate a(3) = 2 twin prime candidates in every interval of prime(3)# = 30 starting after prime(3). For example, the composites 25 and 35 eliminate the twin prime candidate pairs centered at 24 and 36, respectively, while the composites 55 and 65 eliminate the twin prime candidates centered at 54 and 66.
For the prime factor prime(4) = 7, there will be 8 composites having prime(4) for their lowest prime factor within every interval of prime(4)# = 210 starting after 7. For instance, the composites {49, 77, 91, 119, 133, 161, 203, 217} are adjacent to and eliminate the twin prime candidates centered at {48, 78, 90, 120, 132, 162, 204, 216}. However, 2 of those 8 are already eliminated by prime(3), those being the candidates centered at 204 and 216, since 205 and 215 obviously are composites having 5 for their lowest prime factor. And in the next interval of prime(4)# = 210 the pattern repeats. The composites {259, 287, 301, 329, 343, 371, 413, 427} all have 7 for their lowest prime factor and they eliminate the twin prime candidate pairs centered at {258, 288, 300, 330, 342, 372, 414, 426}. But the ones centered at 414 and 426 are also adjacent to 415 and 425, which have 5 for their lowest prime factor and thus can be considered to have already been eliminated. a(4) = 8 - 2 = 6.
For prime(5) = 11, there are 48 composites that have 11 for their lowest prime factor over any interval of prime(5)# = 2310 starting after 11. Those 48 composites are all adjacent to a twin prime candidate center post, but 12 of those candidates are eliminated by prime(3) (the ones corresponding to the centers 144, 186, 474, 516, 804, 1134, 1176, 1506, 1794, 1836, 2124 and 2166) and 6 are eliminated by prime(4) (those corresponding to the candidate centered at 120, 342, 582, 1728, 1968 and 2190). That is a total of 18 out of those 48 in every interval of 2310 that are eliminated by a prime factor less than prime(5), therefore a(5) = 48 - 18 = 30.
But then 30 = 6(7-2) and 6 = 2(5-2). By continuing to count the twin prime eliminations in this manner, it can be deduced that each subsequent term is found by multiplying the previous term by the previous prime minus 2.
		

Crossrefs

Programs

  • Mathematica
    nxt[{n_,a_}]:={n+1,a(Prime[n]-2)}; Join[{0,0},Transpose[NestList[nxt,{3,2},20]][[2]]] (* Harvey P. Dale, Sep 23 2015 *)

Formula

a(1) = a(2) = 0; a(3) = 2; for n >= 4, a(n) = (prime(n-1)-2)*a(n-1), where prime(n) is the n-th prime.

A158039 Determinant of power series of gamma matrix with determinant 7!.

Original entry on oeis.org

5040, 464642640, 9271613897280, 126088436280779280, 1500148651789039497840, 16877281623734016459152640, 186571560637066991905251295920, 2070944486059672103635752020488080
Offset: 0

Views

Author

Keywords

Comments

a(n) = Determinant(A + A^2 + A^3 + A^4 + A^5 + ... + A^n)
where A is the submatrix A(1..8,1..8) of the matrix with factorial determinant
A = [[1,1,1,1,1,1,...], [1,2,1,2,1,2,...], [1,2,3,1,2,3,...], [1,2,3,4,1,2,...], [1,2,3,4,5,1,...], [1,2,3,4,5,6,...], ...]; note: Determinant A(1..n,1..n) = (n-1)!.

Examples

			a(1) = Determinant(A) = 7! = 5040.
		

References

  • G. Balzarotti and P. P. Lava, Le sequenze di numeri interi, Hoepli, 2008.

Crossrefs

Programs

  • Maple
    seq(Determinant(sum(A^i,i=1..n)),n=1..20);

A158043 Determinant of power series of gamma matrix with determinant 5!.

Original entry on oeis.org

120, 207600, 96647880, 30798705600, 8636938282920, 2309545097941200, 608543327609001240, 160948481103837273600, 43112754053898172364280, 11708778018848186302158000, 3213002829193456223967295560
Offset: 0

Views

Author

Keywords

Comments

a(n) = Determinant(A + A^2 + A^3 + A^4 + A^5 + ... + A^n)
where A is the submatrix A(1..6,1..6) of the matrix with factorial determinant
A = [[1,1,1,1,1,1,...], [1,2,1,2,1,2,...], [1,2,3,1,2,3,...], [1,2,3,4,1,2,...], [1,2,3,4,5,1,...], [1,2,3,4,5,6,...], ...]; note: Determinant A(1..n,1..n) = (n-1)!.

Examples

			a(1) = Determinant(A) = 5! = 120.
		

References

  • G. Balzarotti and P. P. Lava, Le sequenze di numeri interi, Hoepli, 2008.

Crossrefs

Programs

  • Maple
    seq(Determinant(sum(A^i,i=1..n)),n=1..30);

A158044 Determinant of power series of gamma matrix with determinant 6!.

Original entry on oeis.org

720, 8482320, 23846746320, 46069117007760, 78423934939027920, 126377664053739048720, 199725313669091369807760, 316583663401497456387173520, 508625335390476191389947899280
Offset: 0

Views

Author

Keywords

Comments

a(n) = Determinant(A + A^2 + A^3 + A^4 + A^5 + ... + A^n)
where A is the submatrix A(1..7,1..7) of the matrix with factorial determinant
A = [[1,1,1,1,1,1,...], [1,2,1,2,1,2,...], [1,2,3,1,2,3,...], [1,2,3,4,1,2,...], [1,2,3,4,5,1,...], [1,2,3,4,5,6,...], ...]; note: Determinant A(1..n,1..n) = (n-1)!.

Examples

			a(1) = Determinant(A) = 6! = 720.
		

References

  • G. Balzarotti and P. P. Lava, Le sequenze di numeri interi, Hoepli, 2008

Crossrefs

Programs

  • Maple
    seq(Determinant(sum(A^i,i=1..n)),n=1..30);

A158050 Determinant of power series with alternate signs of gamma matrix with determinant 7!.

Original entry on oeis.org

5040, -4137840, 99515142720, -1122871063189680, 9688118420572305840, -150299359081533202947840, 1405831144255746621131643120, -18442639987146150894175704882480, 203561673763315319923663885655833920
Offset: 0

Views

Author

Keywords

Comments

a(n) = Determinant(A - A^2 + A^3 - A^4 + A^5 - ... - (-1)^n*A^n)
where A is the submatrix A(1..8,1..8) of the matrix with factorial determinant
A= [[1,1,1,1,1,1,...], [1,2,1,2,1,2,...], [1,2,3,1,2,3,...], [1,2,3,4,1,2,...], [1,2,3,4,5,1,...], [1,2,3,4,5,6,...], ...]; note: Determinant A(1..n,1..n) = (n-1)!.
a(n) is even with respect to signs of power of A.

Examples

			a(1) = Determinant(A) = 7! = 5040.
		

References

  • G. Balzarotti and P. P. Lava, Le sequenze di numeri interi, Hoepli, 2008

Crossrefs

Programs

  • Maple
    seq(Determinant(sum(A^i*(-1)^(i-1),i=1..n)),n=1..20);

A372727 Triangle read by rows: T(n, k) = n if k = 0, otherwise n - k*floor(n/k). The binary modulo operation.

Original entry on oeis.org

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

Views

Author

Peter Luschny, May 13 2024

Keywords

Comments

The binary operation 'mod' as defined here is discussed in 'Concrete Mathematics' by Graham et. al. on p. 82 and the connection with the congruence relation '(mod)' on p. 123. See also Bach & Shallit, p. 21, and Apostol, p. 14.
This definition is implemented in Sage, but not in Python. For example, Sage answers 0.mod(0) = 0, whereas in Python 0 % 0 leads to a 'ZeroDivisionError'. What is often misunderstood is that the operation 'mod' gives answers to divisibility, not to division. Apostol shows that n|0 (every integer divides zero), but 0|n implies n = 0 (zero divides only zero), and thus confirms the result given by Sage.

Examples

			Triangle begins:
  [ 0]  0;
  [ 1]  1, 0;
  [ 2]  2, 0, 0;
  [ 3]  3, 0, 1, 0;
  [ 4]  4, 0, 0, 1, 0;
  [ 5]  5, 0, 1, 2, 1, 0;
  [ 6]  6, 0, 0, 0, 2, 1, 0;
  [ 7]  7, 0, 1, 1, 3, 2, 1, 0;
  [ 8]  8, 0, 0, 2, 0, 3, 2, 1, 0;
  [ 9]  9, 0, 1, 0, 1, 4, 3, 2, 1, 0;
  [10] 10, 0, 0, 1, 2, 0, 4, 3, 2, 1, 0;
  [11] 11, 0, 1, 2, 3, 1, 5, 4, 3, 2, 1, 0;
.
The triangle shows the modulo operation in the range 0 <= k <= n. Test your
computer implementation in the range R X R where R = [-6, ..., 0, ..., 6].
According to Graham et al. it should look like this:
   0, -1, -2,  0,  0, 0, -6, 0, 0, 0, 2, 4, 0
  -5,  0, -1, -2, -1, 0, -5, 0, 1, 1, 3, 0, 1
  -4, -4,  0, -1,  0, 0, -4, 0, 0, 2, 0, 1, 2
  -3, -3, -3,  0, -1, 0, -3, 0, 1, 0, 1, 2, 3
  -2, -2, -2, -2,  0, 0, -2, 0, 0, 1, 2, 3, 4
  -1, -1, -1, -1, -1, 0, -1, 0, 1, 2, 3, 4, 5
   0,  0,  0,  0,  0, 0,  0, 0, 0, 0, 0, 0, 0
  -5, -4, -3, -2, -1, 0,  1, 0, 1, 1, 1, 1, 1
  -4, -3, -2, -1,  0, 0,  2, 0, 0, 2, 2, 2, 2
  -3, -2, -1,  0, -1, 0,  3, 0, 1, 0, 3, 3, 3
  -2, -1,  0, -2,  0, 0,  4, 0, 0, 1, 0, 4, 4
  -1,  0, -3, -1, -1, 0,  5, 0, 1, 2, 1, 0, 5
   0, -4, -2,  0,  0, 0,  6, 0, 0, 0, 2, 1, 0
		

References

  • Tom Apostol, Introduction to analytic number theory, 1976, Springer, page 14.
  • Eric Bach and Jeffrey Shallit, Algorithmic Number Theory, 1997, p. 21.
  • Ronald L. Graham, Donald E. Knuth and Oren Patashnik, Concrete Mathematics, 2nd ed., Addison-Wesley, 1994, 34th printing 2022, p. 81f.

Crossrefs

Cf. A111490 (row sums).
Cf. A048158.

Programs

  • Maple
    MOD := (n, k) -> ifelse(k = 0, n, n - k * iquo(n, k)):
    seq( seq(MOD(n, k), k = 0..n), n = 0..12);
  • Python
    def T(n, k): return n if k == 0 else n - k * (n // k)
    for n in range(12): print([T(n, k) for k in range(n + 1)])
    
  • Python
    def A372727_T(n, k): return n % k if k else n # Chai Wah Wu, May 14 2024
  • SageMath
    def T(n, k): return n.mod(k)
    for n in srange(12): print([T(n, k) for k in range(n + 1)])
    
Previous Showing 11-20 of 25 results. Next