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

A130486 a(n) = Sum_{k=0..n} (k mod 8) (Partial sums of A010877).

Original entry on oeis.org

0, 1, 3, 6, 10, 15, 21, 28, 28, 29, 31, 34, 38, 43, 49, 56, 56, 57, 59, 62, 66, 71, 77, 84, 84, 85, 87, 90, 94, 99, 105, 112, 112, 113, 115, 118, 122, 127, 133, 140, 140, 141, 143, 146, 150, 155, 161, 168, 168, 169, 171, 174, 178, 183, 189, 196, 196, 197, 199, 202, 206
Offset: 0

Views

Author

Hieronymus Fischer, May 31 2007

Keywords

Comments

Let A be the Hessenberg n X n matrix defined by A[1,j] = j mod 8, A[i,i]:=1, A[i,i-1]=-1. Then, for n >= 1, a(n)=det(A). - Milan Janjic, Jan 24 2010

Crossrefs

Programs

  • GAP
    a:=[0,1,3,6,10,15,21,28,28];; for n in [10..71] do a[n]:=a[n-1]+a[n-8]-a[n-9]; od; a; # G. C. Greubel, Aug 31 2019
  • Magma
    I:=[0,1,3,6,10,15,21,28,28]; [n le 9 select I[n] else Self(n-1) + Self(n-8) - Self(n-9): n in [1..71]]; // G. C. Greubel, Aug 31 2019
    
  • Maple
    seq(coeff(series(x*(1-8*x^7+7*x^8)/((1-x^8)*(1-x)^3), x, n+1), x, n), n = 0 .. 40); # G. C. Greubel, Aug 31 2019
  • Mathematica
    Array[28 Floor[#1/8] + #2 (#2 + 1)/2 & @@ {#, Mod[#, 8]} &, 61, 0] (* Michael De Vlieger, Apr 28 2018 *)
    Accumulate[PadRight[{},100,Range[0,7]]] (* Harvey P. Dale, Dec 21 2018 *)
  • PARI
    a(n) = sum(k=0, n, k % 8); \\ Michel Marcus, Apr 28 2018
    
  • Sage
    def A130486_list(prec):
        P. = PowerSeriesRing(ZZ, prec)
        return P(x*(1-8*x^7+7*x^8)/((1-x^8)*(1-x)^3)).list()
    A130486_list(70) # G. C. Greubel, Aug 31 2019
    

Formula

a(n) = 28*floor(n/8) + A010877(n)*(A010877(n) + 1)/2.
G.f.: (Sum_{k=1..7} k*x^k)/((1-x^8)*(1-x)).
G.f.: x*(1 - 8*x^7 + 7*x^8)/((1-x^8)*(1-x)^3).

A010888 Digital root of n (repeatedly add the digits of n until a single digit is reached).

Original entry on oeis.org

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

Views

Author

Keywords

Comments

This is sometimes also called the additive digital root of n.
n mod 9 (A010878) is a very similar sequence.
Partial sums are given by A130487(n-1) + n (for n > 0). - Hieronymus Fischer, Jun 08 2007
Decimal expansion of 13717421/111111111 is 0.123456789123456789123456789... with period 9. - Eric Desbiaux, May 19 2008
Decimal expansion of 13717421 / 1111111110 = 0.0[123456789] (periodic) - Daniel Forgues, Feb 27 2017
a(A005117(n)) < 9. - Reinhard Zumkeller, Mar 30 2010
My friend Jahangeer Kholdi has found that 19 is the smallest prime p such that for each number n, a(p*n) = a(n). In fact we have: a(m*n) = a(a(m)*a(n)) so all numbers with digital root 1 (numbers of the form 9k + 1) have this property. See comment lines of A017173. Also we have a(m+n) = a(a(m) + a(n)). - Farideh Firoozbakht, Jul 23 2010

Examples

			The digits of 37 are 3 and 7, and 3 + 7 = 10. And the digits of 10 are 1 and 0, and 1 + 0 = 1, so a(37) = 1.
		

References

  • Martin Gardner, Mathematics, Magic and Mystery, 1956.

Crossrefs

Cf. A007953, A007954, A031347, A113217, A113218, A010878 (n mod 9), A010872, A010873, A010874, A010875, A010876, A010877, A010879, A004526, A002264, A002265, A002266, A017173, A031286 (additive persistence of n), (multiplicative digital root of n), A031346 (multiplicative persistence of n).

Programs

Formula

If n = 0 then a(n) = 0; otherwise a(n) = (n reduced mod 9), but if the answer is 0 change it to 9.
Equivalently, if n = 0 then a(n) = 0, otherwise a(n) = (n - 1 reduced mod 9) + 1.
If the initial 0 term is ignored, the sequence is periodic with period 9.
From Hieronymus Fischer, Jun 08 2007: (Start)
a(n) = A010878(n-1) + 1 (for n > 0).
G.f.: g(x) = x*(Sum_{k = 0..8}(k+1)*x^k)/(1 - x^9). Also: g(x) = x(9x^10 - 10x^9 + 1)/((1 - x^9)(1 - x)^2). (End)
a(n) = n - 9*floor((n-1)/9), for n > 0. - José de Jesús Camacho Medina, Nov 10 2014

A010873 a(n) = n mod 4.

Original entry on oeis.org

0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0
Offset: 0

Views

Author

Keywords

Comments

Complement of A002265, since 4*A002265(n)+a(n) = n. - Hieronymus Fischer, Jun 01 2007
The rightmost digit in the base-4 representation of n. Also, the equivalent value of the two rightmost digits in the base-2 representation of n. - Hieronymus Fischer, Jun 11 2007
Periodic sequences of this type can be also calculated by a(n) = floor(q/(p^m-1)*p^n) mod p, where q is the number representing the periodic digit pattern and m is the period length. p and q can be calculated as follows: Let D be the array representing the number pattern to be repeated, m = size of D, max = maximum value of elements in D. Than p := max + 1 and q := p^m*sum_{i=1..m} D(i)/p^i. Example: D = (0, 1, 2, 3), p = 4 and q = 57 for this sequence. - Hieronymus Fischer, Jan 04 2013

Crossrefs

Partial sums: A130482. Other related sequences A130481, A130483, A130484, A130485.

Programs

Formula

a(n) = (1/2)*(3-(-1)^n-2*(-1)^floor(n/2));
also a(n) = (1/2)*(3-(-1)^n-2*(-1)^((2*n-1+(-1)^n)/4));
also a(n) = (1/2)*(3-(-1)^n-2*sin(Pi/4*(2n+1+(-1)^n))).
G.f.: (3x^3+2x^2+x)/(1-x^4). - Hieronymus Fischer, May 29 2007
From Hieronymus Fischer, Jun 11 2007: (Start)
Trigonometric representation: a(n)=2^2*(sin(n*Pi/4))^2*sum{1<=k<4, k*product{1<=m<4,m<>k, (sin((n-m)*Pi/4))^2}}. Clearly, the squared terms may be replaced by their absolute values '|.|'.
Complex representation: a(n)=1/4*(1-r^n)*sum{1<=k<4, k*product{1<=m<4,m<>k, (1-r^(n-m))}} where r=exp(Pi/2*i)=i=sqrt(-1). All these formulas can be easily adapted to represent any periodic sequence.
a(n) = n mod 2+2*(floor(n/2)mod 2) = A000035(n)+2*A000035(A004526(n)). (End)
a(n) = 6 - a(n-1) - a(n-2) - a(n-3) for n > 2. - Reinhard Zumkeller, Apr 13 2008
a(n) = 3/2 + cos((n+1)*Pi)/2 + sqrt(2)*cos((2*n+3)*Pi/4). - Jaume Oliver Lafont, Dec 05 2008
From Hieronymus Fischer, Jan 04 2013: (Start)
a(n) = floor(41/3333*10^(n+1)) mod 10.
a(n) = floor(19/85*4^(n+1)) mod 4. (End)
E.g.f.: 2*sinh(x) - sin(x) + cosh(x) - cos(x). - Stefano Spezia, Apr 20 2021
From Nicolas Bělohoubek, May 30 2024: (Start)
a(n) = (2*a(n-1)-1)*(2-a(n-2)) for n > 1.
a(n) = (2*a(n-1)^2+1)*(3-a(n-1))/3 for n > 0. (End)

Extensions

First to third formulas re-edited for better readability by Hieronymus Fischer, Dec 05 2011
Incorrect g.f. removed by Georg Fischer, May 18 2019

A046034 Numbers whose digits are primes.

Original entry on oeis.org

2, 3, 5, 7, 22, 23, 25, 27, 32, 33, 35, 37, 52, 53, 55, 57, 72, 73, 75, 77, 222, 223, 225, 227, 232, 233, 235, 237, 252, 253, 255, 257, 272, 273, 275, 277, 322, 323, 325, 327, 332, 333, 335, 337, 352, 353, 355, 357, 372, 373, 375, 377, 522, 523, 525, 527, 532
Offset: 1

Views

Author

Keywords

Comments

If n is represented as a zerofree base-4 number (see A084544) according to n=d(m)d(m-1)...d(3)d(2)d(1)d(0) then a(n) = Sum_{j=0..m} c(d(j))*10^j, where c(k)=2,3,5,7 for k=1..4. - Hieronymus Fischer, May 30 2012
According to A153025, it seems that 5, 235 and 72335 are the only terms whose square is also a term, i.e., which are also in the sequence A275971 of square roots of the terms which are squares, listed in A191486. - M. F. Hasler, Sep 16 2016

Examples

			a(100)   = 2277,
a(10^3)  = 55327,
a(9881)  = 3233232,
a(10^4)  = 3235757,
a(10922) = 3333333,
a(10^5)  = 227233257.
		

Crossrefs

Programs

  • Haskell
    a046034 n = a046034_list !! (n-1)
    a046034_list = filter (all (`elem` "2357") . show ) [0..]
    -- Reinhard Zumkeller, Jul 19 2011
    
  • Magma
    [n: n in [2..532] | Set(Intseq(n)) subset [2, 3, 5, 7]];  // Bruno Berselli, Jul 19 2011
    
  • Mathematica
    Table[FromDigits /@ Tuples[{2, 3, 5, 7}, n], {n, 3}] // Flatten (* Michael De Vlieger, Sep 19 2016 *)
  • PARI
    is_A046034(n)=Set(isprime(digits(n)))==[1] \\ M. F. Hasler, Oct 12 2013
    
  • Python
    def A046034(n):
        m = (3*n+1).bit_length()-1>>1
        return int(''.join(('2357'[(3*n+1-(1<<(m<<1)))//(3<<((m-1-j)<<1))&3] for j in range(m)))) # Chai Wah Wu, Feb 08 2023

Formula

A055642(a(n)) = A193238(a(n)). - Reinhard Zumkeller, Jul 19 2011
From Hieronymus Fischer, Apr 20, May 30 and Jun 25 2012: (Start)
a(n) = Sum_{j=0..m-1} ((2*b(j)+1) mod 8 + floor(b(j)/4) - floor((b(j)-1)/4))*10^j, where m = floor(log_4(3*n+1)), b(j) = floor((3*n+1-4^m)/(3*4^j)).
a(n) = Sum_{j=0..m-1} A010877(A005408(b(j)) + A002265(b(j)) - A002265(b(j)-1))*10^j.
Special values:
a(1*(4^n-1)/3) = 2*(10^n-1)/9.
a(2*(4^n-1)/3) = 1*(10^n-1)/3.
a(3*(4^n-1)/3) = 5*(10^n-1)/9.
a(4*(4^n-1)/3) = 7*(10^n-1)/9.
Inequalities:
a(n) <= 2*(10^log_4(3*n+1)-1)/9, equality holds for n = (4^k-1)/3, k>0.
a(n) <= 2*A084544(n), equality holds iff all digits of A084544(n) are 1.
a(n) > A084544(n).
Lower and upper limits:
lim inf a(n)/10^log_4(n) = (7/90)*10^log_4(3) = 0.48232167706987..., for n -> oo.
lim sup a(n)/10^log_4(n) = (2/9)*10^log_4(3) = 1.378061934485343..., for n -> oo.
where 10^log_4(n) = n^1.66096404744...
G.f.: g(x) = (x^(1/3)*(1-x))^(-1) Sum_{j>=0} 10^j*z(j)^(4/3)*(2 + z(j) + 2*z(j)^2 + 2*z(j)^3 - 7*z(j)^4)/(1-z(j)^4), where z(j) = x^4^j.
Also g(x) = (x^(1/3)*(1-x))^(-1) Sum_{j>=0} 10^j*z(j)^(4/3)*(1-z(j))*(2 + 3*z(j) + 5*z(j)^2 + 7*z(j)^3)/(1-z(j)^4), where z(j)=x^4^j.
Also: g(x) = (1/(1-x))*(2*h_(4,0)(x) + h_(4,1)(x) + 2*h_(4,2)(x) + 2*h_(4,3)(x) - 7*h_(4,4)(x)), where h_(4,k)(x) = Sum_{j>=0} 10^j*x^((4^(j+1)-1)/3)*x^(k*4^j)/(1-x^4^(j+1)). (End)
Sum_{n>=1} 1/a(n) = 1.857333779940977502574887651449435985318556794733869779170825138954093657197... (calculated using Baillie and Schmelzer's kempnerSums.nb, see Links). - Amiram Eldar, Feb 15 2024

Extensions

More terms from Cino Hilliard, Aug 06 2006
Typo in second formula corrected by Hieronymus Fischer, May 12 2012
Two typos in example section corrected by Hieronymus Fischer, May 30 2012

A276573 The infinite trunk of least squares beanstalk: The only infinite sequence such that a(0) = 0 and a(n-1) = a(n) - least number of squares (A002828) that sum to a(n).

Original entry on oeis.org

0, 3, 6, 8, 11, 15, 16, 18, 21, 24, 27, 30, 32, 35, 38, 40, 43, 45, 48, 51, 53, 56, 59, 63, 64, 67, 70, 72, 75, 78, 80, 83, 85, 88, 90, 93, 96, 99, 102, 105, 108, 112, 115, 117, 120, 123, 126, 128, 131, 134, 136, 139, 143, 144, 147, 149, 152, 155, 158, 160, 162, 165, 168, 171, 173, 176, 179, 183, 186, 189, 192, 195
Offset: 0

Views

Author

Antti Karttunen, Sep 07 2016

Keywords

Crossrefs

Cf. A002828, A005563, A255131, A260731, A260733, A262689, A276572, A276574, A276575 (first differences), A277016 (squares present), A277015 (their square roots), A277888 (primes), A278486 (numbers one more than a prime), A278265, A278487, A278488, A278491 (another subsequence), A278497, A278498, A278499, A278513, A278516, A278517, A278518, A278519, A278521, A278522.
Cf. A277890 & A277891 (number of even and odd terms in each range. The latter seem to be slightly more numerous), A277889.
Positions of nonzero terms in A278515.
Subsequence of A278489, no common terms with A278490.
Cf. also A179016, A259934, A276583, A276613, A276623 for similar constructions.

Programs

Formula

a(n) = A276574(A276572(n)).
Other identities and observations. For all n >= 0:
A260731(a(n)) = n.
a(A260733(n+1)) = A005563(n).
A278517(n) <= a(n) <= A278519(n).
A010873(a(n)) = A278499(n). [Terms reduced modulo 4.]
A010877(a(n)) = A278488(n). [modulo 8.]
A046523(a(n)) = A278497(n). [Least number with the same prime signature.]
A008683(a(n)) = A278513(n).
A065338(a(n)) = A278498(n).
A278509(a(n)) = A278265(n).
A278216(a(n)) = A278516(n). [Number of children the n-th node of the trunk has.]

Extensions

Definition clarified and more identities added to the Formula section by Antti Karttunen, Nov 28 2016

A130481 a(n) = Sum_{k=0..n} (k mod 3) (i.e., partial sums of A010872).

Original entry on oeis.org

0, 1, 3, 3, 4, 6, 6, 7, 9, 9, 10, 12, 12, 13, 15, 15, 16, 18, 18, 19, 21, 21, 22, 24, 24, 25, 27, 27, 28, 30, 30, 31, 33, 33, 34, 36, 36, 37, 39, 39, 40, 42, 42, 43, 45, 45, 46, 48, 48, 49, 51, 51, 52, 54, 54, 55, 57, 57, 58, 60, 60, 61, 63, 63, 64, 66, 66, 67, 69, 69, 70, 72, 72
Offset: 0

Views

Author

Hieronymus Fischer, May 29 2007

Keywords

Comments

Essentially the same as A092200. - R. J. Mathar, Jun 13 2008
Let A be the Hessenberg n X n matrix defined by: A[1,j]=j mod 3, A[i,i]:=1, A[i,i-1]=-1. Then, for n>=1, a(n)=det(A). - Milan Janjic, Jan 24 2010
2-adic valuation of A104537(n+1). - Gerry Martens, Jul 14 2015
Conjecture: a(n) is the exponent of the largest power of 2 that divides all the entries of the matrix {{3,1},{1,-1}}^n. - Greg Dresden, Sep 09 2018

Crossrefs

Programs

  • GAP
    List([0..80], n-> Int((n+1)/3) + Int(2*(n+1)/3)); # G. C. Greubel, Aug 31 2019
  • Magma
    [Floor((n+1)/3) + Floor(2*(n+1)/3): n in [0..80]]; // G. C. Greubel, Aug 31 2019
    
  • Maple
    seq(coeff(series(x*(1+2*x)/((1-x^3)*(1-x)), x, n+1), x, n), n = 0..80); # G. C. Greubel, Aug 31 2019
  • Mathematica
    a[n_]:= Floor[(n+1)/3] + Floor[2(n+1)/3]; Table[a[n], {n, 0, 80}] (* Clark Kimberling, May 28 2012 *)
    a[n_]:= IntegerExponent[A104537[n + 1], 2];
    Table[a[n], {n, 0, 80}]  (* Gerry Martens, Jul 14 2015 *)
    CoefficientList[Series[x(1+2x)/((1-x^3)(1-x)), {x, 0, 80}], x] (* Stefano Spezia, Sep 09 2018 *)
    LinearRecurrence[{1,0,1,-1},{0,1,3,3},100] (* Harvey P. Dale, Jun 14 2021 *)
  • PARI
    main(size)=my(n,k);vector(size,n,sum(k=0,n,k%3)) \\ Anders Hellström, Jul 14 2015
    
  • PARI
    first(n)=my(s); concat(0, vector(n,k,s+=k%3)) \\ Charles R Greathouse IV, Jul 14 2015
    
  • PARI
    a(n)=n\3*3+[0,1,3][n%3+1] \\ Charles R Greathouse IV, Jul 14 2015
    
  • Sage
    def A130481_list(prec):
        P. = PowerSeriesRing(ZZ, prec)
        return P(x*(1+2*x)/((1-x^3)*(1-x))).list()
    A130481_list(80) # G. C. Greubel, Aug 31 2019
    

Formula

a(n) = 3*floor(n/3) + A010872(n)*(A010872(n) + 1)/2.
G.f.: x*(1 + 2*x)/((1-x^3)*(1-x)).
a(n) = n + 1 - (Fibonacci(n+1) mod 2). - Gary Detlefs, Mar 13 2011
a(n) = floor((n+1)/3) + floor(2*(n+1)/3). - Clark Kimberling, May 28 2010
a(n) = n when n+1 is not a multiple of 3, and a(n) = n+1 when n+1 is a multiple of 3. - Dennis P. Walsh, Aug 06 2012
a(n) = n + 1 - sign((n+1) mod 3). - Wesley Ivan Hurt, Sep 25 2017
a(n) = n + (1-cos(2*(n+2)*Pi/3))/3 + sin(2*(n+2)*Pi/3)/sqrt(3). - Wesley Ivan Hurt, Sep 27 2017
a(n) = n + 1 - (n+1)^2 mod 3. - Ammar Khatab, Aug 14 2020
E.g.f.: ((1 + 3*x)*cosh(x) - (cos(sqrt(3)*x/2) + sqrt(3)*sin(sqrt(3)*x/2))*(cosh(x/2) - sinh(x/2)) + (1 + 3*x)*sinh(x))/3. - Stefano Spezia, May 28 2021
Sum_{n>=1} (-1)^(n+1)/a(n) = Pi/(3*sqrt(3)) + log(2)/3. - Amiram Eldar, Sep 17 2022

A130482 a(n) = Sum_{k=0..n} (k mod 4) (Partial sums of A010873).

Original entry on oeis.org

0, 1, 3, 6, 6, 7, 9, 12, 12, 13, 15, 18, 18, 19, 21, 24, 24, 25, 27, 30, 30, 31, 33, 36, 36, 37, 39, 42, 42, 43, 45, 48, 48, 49, 51, 54, 54, 55, 57, 60, 60, 61, 63, 66, 66, 67, 69, 72, 72, 73, 75, 78, 78, 79, 81, 84, 84, 85, 87, 90, 90, 91, 93, 96, 96, 97, 99, 102, 102, 103, 105
Offset: 0

Views

Author

Hieronymus Fischer, May 29 2007

Keywords

Comments

Let A be the Hessenberg n X n matrix defined by: A[1,j]=j mod 4, A[i,i]:=1, A[i,i-1]=-1. Then, for n>=1, a(n)=det(A). - Milan Janjic, Jan 24 2010

Crossrefs

Programs

  • GAP
    a:=[0,1,3,6,6];; for n in [6..71] do a[n]:=a[n-1]+a[n-4]-a[n-5]; od; a; # G. C. Greubel, Aug 31 2019
  • Magma
    I:=[0,1,3,6,6]; [n le 5 select I[n] else Self(n-1) + Self(n-4) - Self(n-5): n in [1..71]]; // G. C. Greubel, Aug 31 2019
    
  • Maple
    a:=n->add(chrem( [n,j], [1,4] ),j=1..n):seq(a(n), n=0..70); # Zerinvary Lajos, Apr 07 2009
  • Mathematica
    Table[(6*n +(1-(-1)^n)*(1+2*I^(n+1)))/4, {n,0,70}] (* G. C. Greubel, Aug 31 2019 *)
    LinearRecurrence[{1,0,0,1,-1},{0,1,3,6,6},80] (* Harvey P. Dale, Feb 16 2024 *)
  • PARI
    a(n) = (1 - (-1)^n - (2*I)*(-I)^n + (2*I)*I^n + 6*n) / 4 \\ Colin Barker, Oct 15 2015
    
  • Sage
    def A130482_list(prec):
        P. = PowerSeriesRing(ZZ, prec)
        return P(x*(1+2*x+3*x^2)/((1-x^4)*(1-x))).list()
    A130482_list(70) # G. C. Greubel, Aug 31 2019
    

Formula

a(n) = 6*floor(n/4) + A010873(n)*(A010873(n)+1)/2.
G.f.: x*(1 + 2*x + 3*x^2)/((1-x^4)*(1-x)).
a(n) = (1 - (-1)^n - (2*i)*(-i)^n + (2*i)*i^n + 6*n) / 4 where i = sqrt(-1). - Colin Barker, Oct 15 2015
a(n) = 3*n/2 + (n mod 2)* ( (n-1) mod 4 ) - (n mod 2)/2. - Ammar Khatab, Aug 27 2020
E.g.f.: (3*x*exp(x) - 2*sin(x) + sinh(x))/2. - Stefano Spezia, Apr 22 2021
Sum_{n>=1} (-1)^(n+1)/a(n) = Pi/(4*sqrt(3)) + log(3)/4. - Amiram Eldar, Sep 17 2022

A130483 a(n) = Sum_{k=0..n} (k mod 5) (Partial sums of A010874).

Original entry on oeis.org

0, 1, 3, 6, 10, 10, 11, 13, 16, 20, 20, 21, 23, 26, 30, 30, 31, 33, 36, 40, 40, 41, 43, 46, 50, 50, 51, 53, 56, 60, 60, 61, 63, 66, 70, 70, 71, 73, 76, 80, 80, 81, 83, 86, 90, 90, 91, 93, 96, 100, 100, 101, 103, 106, 110, 110, 111, 113, 116, 120, 120, 121, 123, 126, 130, 130
Offset: 0

Views

Author

Hieronymus Fischer, May 29 2007

Keywords

Comments

Let A be the Hessenberg n X n matrix defined by: A[1,j]=j mod 5, A[i,i]=1, A[i,i-1]=-1. Then, for n>=1, a(n)=det(A). - Milan Janjic, Jan 24 2010

Crossrefs

Programs

  • GAP
    a:=[0,1,3,6,10,10];; for n in [7..71] do a[n]:=a[n-1]+a[n-5]-a[n-6]; od; a; # G. C. Greubel, Aug 31 2019
  • Magma
    I:=[0,1,3,6,10,10]; [n le 6 select I[n] else Self(n-1) + Self(n-5) - Self(n-6): n in [1..71]]; // G. C. Greubel, Aug 31 2019
    
  • Maple
    seq(coeff(series(x*(1+2*x+3*x^2+4*x^3)/((1-x^5)*(1-x)), x, n+1), x, n), n = 0..70); # G. C. Greubel, Aug 31 2019
  • Mathematica
    Accumulate[Mod[Range[0,70],5]] (* or *) Accumulate[PadRight[{},70,{0,1,2,3,4}]] (* Harvey P. Dale, Nov 11 2016 *)
  • PARI
    a(n) = sum(k=0, n, k % 5); \\ Michel Marcus, Apr 28 2018
    
  • Sage
    def A130483_list(prec):
        P. = PowerSeriesRing(ZZ, prec)
        return P(x*(1+2*x+3*x^2+4*x^3)/((1-x^5)*(1-x))).list()
    A130483_list(70) # G. C. Greubel, Aug 31 2019
    

Formula

a(n) = 10*floor(n/5) + A010874(n)*(A010874(n)+1)/2.
G.f.: x*(1 + 2*x + 3*x^2 + 4*x^3)/((1-x^5)*(1-x)).
From Wesley Ivan Hurt, Jul 23 2016: (Start)
a(n) = a(n-5) - a(n-6) for n>5; a(n) = a(n-5) + 10 for n>4.
a(n) = 10 + Sum_{k=1..4} k*floor((n-k)/5). (End)
a(n) = ((n mod 5)^2 - 3*(n mod 5) + 4*n)/2. - Ammar Khatab, Aug 13 2020

A130484 a(n) = Sum_{k=0..n} (k mod 6) (Partial sums of A010875).

Original entry on oeis.org

0, 1, 3, 6, 10, 15, 15, 16, 18, 21, 25, 30, 30, 31, 33, 36, 40, 45, 45, 46, 48, 51, 55, 60, 60, 61, 63, 66, 70, 75, 75, 76, 78, 81, 85, 90, 90, 91, 93, 96, 100, 105, 105, 106, 108, 111, 115, 120, 120, 121, 123, 126, 130, 135, 135, 136, 138, 141, 145, 150, 150, 151, 153
Offset: 0

Views

Author

Hieronymus Fischer, May 31 2007

Keywords

Comments

Let A be the Hessenberg n X n matrix defined by A[1,j] = j mod 6, A[i,i]=1, A[i,i-1]=-1. Then, for n >= 1, a(n)=det(A). - Milan Janjic, Jan 24 2010

Crossrefs

Programs

  • GAP
    a:=[0,1,3,6,10,15,15];; for n in [8..71] do a[n]:=a[n-1]+a[n-6]-a[n-7]; od; a; # G. C. Greubel, Aug 31 2019
  • Magma
    I:=[0,1,3,6,10,15,15]; [n le 7 select I[n] else Self(n-1) + Self(n-6) - Self(n-7): n in [1..71]]; // G. C. Greubel, Aug 31 2019
    
  • Maple
    seq(coeff(series(x*(1-6*x^5+5*x^6)/((1-x^6)*(1-x)^3), x, n+1), x, n), n = 0 .. 70); # G. C. Greubel, Aug 31 2019
  • Mathematica
    Accumulate[Mod[Range[0,70],6]] (* or *) Accumulate[PadRight[ {},70, Range[0,5]]] (* Harvey P. Dale, Jul 12 2016 *)
  • PARI
    a(n) = sum(k=0, n, k % 6); \\ Michel Marcus, Apr 28 2018
    
  • PARI
    a(n)=n\6*15 + binomial(n%6+1,2) \\ Charles R Greathouse IV, Jan 24 2022
    
  • Sage
    def A130484_list(prec):
        P. = PowerSeriesRing(ZZ, prec)
        return P(x*(1-6*x^5+5*x^6)/((1-x^6)*(1-x)^3)).list()
    A130484_list(70) # G. C. Greubel, Aug 31 2019
    

Formula

a(n) = 15*floor(n/6) + A010875(n)*(A010875(n) + 1)/2.
G.f.: (Sum_{k=1..5} k*x^k)/((1-x^6)*(1-x)) = x*(1 - 6*x^5 + 5*x^6)/((1-x^6)*(1-x)^3).

A130485 a(n) = Sum_{k=0..n} (k mod 7) (Partial sums of A010876).

Original entry on oeis.org

0, 1, 3, 6, 10, 15, 21, 21, 22, 24, 27, 31, 36, 42, 42, 43, 45, 48, 52, 57, 63, 63, 64, 66, 69, 73, 78, 84, 84, 85, 87, 90, 94, 99, 105, 105, 106, 108, 111, 115, 120, 126, 126, 127, 129, 132, 136, 141, 147, 147, 148, 150, 153, 157, 162, 168, 168, 169, 171, 174, 178, 183
Offset: 0

Views

Author

Hieronymus Fischer, May 31 2007

Keywords

Comments

Let A be the Hessenberg n X n matrix defined by A[1,j] = j mod 7, A[i,i]:=1, A[i,i-1]=-1. Then, for n >= 1, a(n)=det(A). - Milan Janjic, Jan 24 2010

Crossrefs

Programs

  • GAP
    a:=[0,1,3,6,10,15,21,21];; for n in [9..71] do a[n]:=a[n-1]+a[n-7]-a[n-8]; od; a; # G. C. Greubel, Aug 31 2019
  • Magma
    I:=[0,1,3,6,10,15,21,21]; [n le 8 select I[n] else Self(n-1) + Self(n-7) - Self(n-8): n in [1..71]]; // G. C. Greubel, Aug 31 2019
    
  • Maple
    a:=n->add(chrem( [n,j], [1,7] ),j=1..n):seq(a(n), n=1..70); # Zerinvary Lajos, Apr 07 2009
  • Mathematica
    LinearRecurrence[{1,0,0,0,0,0,1,-1},{0,1,3,6,10,15,21,21},70] (* Harvey P. Dale, Jul 30 2017 *)
  • PARI
    concat(0,Vec((1-7*x^6+6*x^7)/(1-x^7)/(1-x)^3+O(x^70))) \\ Charles R Greathouse IV, Dec 22 2011
    
  • Sage
    def A130485_list(prec):
        P. = PowerSeriesRing(ZZ, prec)
        return P(x*(1-7*x^6+6*x^7)/((1-x^7)*(1-x)^3)).list()
    A130485_list(70) # G. C. Greubel, Aug 31 2019
    

Formula

a(n) = 21*floor(n/7) + A010876(n)*(A010876(n) + 1)/2.
G.f.: (Sum_{k=1..6} k*x^k)/((1-x^7)*(1-x)).
G.f.: x*(1 - 7*x^6 + 6*x^7)/((1-x^7)*(1-x)^3).
Showing 1-10 of 36 results. Next