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

A286369 Compound filter: a(n) = 2*A286364(n) + floor(A072400(n)/4).

Original entry on oeis.org

2, 2, 4, 2, 7, 5, 5, 2, 14, 6, 4, 4, 7, 5, 11, 2, 6, 14, 4, 7, 33, 5, 5, 5, 20, 6, 58, 5, 7, 11, 5, 2, 32, 6, 10, 14, 7, 5, 11, 6, 6, 32, 4, 4, 25, 5, 5, 4, 14, 20, 10, 7, 7, 59, 11, 5, 32, 6, 4, 11, 7, 5, 135, 2, 42, 32, 4, 6, 33, 11, 5, 14, 6, 6, 28, 4, 33, 11, 5, 7, 242, 6, 4, 33, 43, 5, 11, 5, 6, 24, 10, 5, 33, 5, 11, 5, 6, 14, 134, 20, 7, 11, 5, 6, 46, 6
Offset: 1

Views

Author

Antti Karttunen, May 09 2017

Keywords

Comments

This sequence contains, in addition to the information contained in A286364 (which packs the values of A286361(n) and A286363(n) to a single value with the pairing function A000027) also the bit-2 of A072400(n) (its third least significant bit), which is here stored as the least significant bit of a(n). In contrast to A286366, the parity of the highest power of 2 dividing n is not stored.
Thus we have (among other such identities) the following two identities related to equivalence class partitioning:
For all odd i, odd j: a(i) = a(j) <=> A286366(i) = A286366(j).
For all odd i, odd j: a(i) = a(j) => A010877(i) = A010877(j). [On odd numbers the information contained in a(n) is sufficient to determine the value of n modulo 8, one of the 1, 3, 5 or 7.]

Crossrefs

Programs

  • Python
    from sympy.ntheory.factor_ import digits
    from sympy import factorint
    from operator import mul
    def P(n):
        f = factorint(n)
        return sorted([f[i] for i in f])
    def a046523(n):
        x=1
        while True:
            if P(n) == P(x): return x
            else: x+=1
    def A(n, k):
        f = factorint(n)
        return 1 if n == 1 else reduce(mul, [1 if i%4==k else i**f[i] for i in f])
    def T(n, m): return ((n + m)**2 - n - 3*m + 2)/2
    def a286364(n): return T(a046523(n/A(n, 1)), a046523(n/A(n, 3)))
    def a072400(n): return int(str(int(''.join(map(str, digits(n, 4)[1:]))[::-1]))[::-1], 4)%8
    def a(n): return 2*a286364(n) + int(a072400(n)/4) # Indranil Ghosh, May 09 2017
  • Scheme
    (define (A286369 n) (+ (* 2 (A286364 n)) (floor->exact (/ (A072400 n) 4))))
    

Formula

a(n) = 2*A286364(n) + floor(A072400(n)/4).

A130489 a(n) = Sum_{k=0..n} (k mod 11) (Partial sums of A010880).

Original entry on oeis.org

0, 1, 3, 6, 10, 15, 21, 28, 36, 45, 55, 55, 56, 58, 61, 65, 70, 76, 83, 91, 100, 110, 110, 111, 113, 116, 120, 125, 131, 138, 146, 155, 165, 165, 166, 168, 171, 175, 180, 186, 193, 201, 210, 220, 220, 221, 223, 226, 230, 235, 241, 248, 256, 265, 275, 275, 276
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 11, 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,36,45, 55,55];; for n in [13..61] do a[n]:=a[n-1]+a[n-11]-a[n-12]; od; a; # G. C. Greubel, Aug 31 2019
  • Magma
    I:=[0,1,3,6,10,15,21,28,36,45,55,55]; [n le 12 select I[n] else Self(n-1) + Self(n-11) - Self(n-12): n in [1..61]]; // G. C. Greubel, Aug 31 2019
    
  • Maple
    seq(coeff(series(x*(1-11*x^10+10*x^11)/((1-x^11)*(1-x)^3), x, n+1), x, n), n = 0 .. 60); # G. C. Greubel, Aug 31 2019
  • Mathematica
    LinearRecurrence[{1,0,0,0,0,0,0,0,0,0,1,-1}, {0,1,3,6,10,15,21,28,36,45, 55,55}, 60] (* G. C. Greubel, Aug 31 2019 *)
    Accumulate[PadRight[{},80,Range[0,10]]] (* Harvey P. Dale, Jul 21 2021 *)
  • PARI
    a(n) = sum(k=0, n, k % 11); \\ Michel Marcus, Apr 28 2018
    
  • Sage
    def A130489_list(prec):
        P. = PowerSeriesRing(ZZ, prec)
        return P(x*(1-11*x^10+10*x^11)/((1-x^11)*(1-x)^3)).list()
    A130489_list(60) # G. C. Greubel, Aug 31 2019
    

Formula

a(n) = 55*floor(n/11) + A010880(n)*(A010880(n) + 1)/2.
G.f.: (Sum_{k=1..10} k*x^k)/((1-x^11)*(1-x)).
G.f.: x*(1 - 11*x^10 + 10*x^11)/((1-x^11)*(1-x)^3).

A257179 Expansion of (1 + x^5) / ((1 - x) * (1 + x^4)) in powers of x.

Original entry on oeis.org

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

Views

Author

Michael Somos, Apr 17 2015

Keywords

Examples

			G.f. = 1 + x + x^2 + x^3 + x^5 + x^6 + x^7 + 2*x^8 + x^9 + x^10 + x^11 + ...
		

Crossrefs

Programs

  • Mathematica
    a[ n_] := Boole[n != 0] - Boole[Mod[n, 4] == 0] + 2 Boole[Mod[n, 8] == 0];
    a[ n_] := -Boole[n == 0] + {1, 1, 1, 0, 1, 1, 1, 2}[[Mod[n, 8, 1]]];
    a[ n_] := SeriesCoefficient[ (1 + x^5) / ((1 - x) * (1 + x^4)), {x, 0, Abs@n}];
  • PARI
    {a(n) = (n != 0) - (n%4 == 0) + 2*(n%8 == 0)};
    
  • PARI
    {a(n) = -(n==0) + [2, 1, 1, 1, 0, 1, 1, 1][n%8 + 1]};
    
  • PARI
    {a(n) = polcoeff( (1 + x^5) / ((1 - x) * (1 + x^4)) + x * O(x^abs(n)), abs(n))};

Formula

Euler transform of length 10 sequence [1, 0, 0, -1, 1, 0, 0, 1, 0, -1].
Moebius transform is length 8 sequence [1, 0, 0, -1, 0, 0, 0, 2].
a(n) is multiplicative with a(2) = 1, a(4) = 0, a(2^e) = 2 if e>2, a(p^e) = 1 if p>2 and a(0) = 1.
G.f.: (1 + x^5) / ((1 - x) * (1 + x^4)).
G.f.: (1 - x^4) * (1 - x^10) / ((1 - x) * (1 - x^5) * (1 - x^8)).
G.f.: -1 + 1 / (1 - x) + 1 / (1 + x^4).
a(n) = a(-n) for all n in Z. a(n+8) = a(n) unless n=0 or n=-8. a(8*n) = 2 unless n=0. a(2*n + 1) = a(4*n + 2) = 1. a(8*n + 4) = 0.
a(n) = A259042(n+4) unless n = 0.
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 1. - Amiram Eldar, Nov 20 2022
Dirichlet g.f.: zeta(s)*(1-1/4^s+2/8^s). - Amiram Eldar, Jan 05 2023

Extensions

More terms from Antti Karttunen, Jul 29 2018

A010889 Simple periodic sequence: repeat 1,2,3,4,5,6,7,8,9,10.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Partial sums are given by A130488(n)+n+1. - Hieronymus Fischer, Jun 08 2007
Continued fraction expansion of (232405+sqrt(71216963807))/348378. [From Klaus Brockhaus, May 15 2010]

Crossrefs

Cf. A177933 (decimal expansion of (232405+sqrt(71216963807))/348378). [From Klaus Brockhaus, May 15 2010]

Programs

  • Mathematica
    PadRight[{},120,Range[10]] (* Harvey P. Dale, Feb 22 2015 *)
  • Python
    def a(n): return n % 10 + 1 # Paul Muljadi, Aug 06 2024

Formula

a(n) = 1 + (n mod 10) - Paolo P. Lava, Nov 21 2006
From Hieronymus Fischer, Jun 08 2007: (Start)
a(n) = A010879(n)+1.
G.f.: (Sum_{k=0..9} (k+1)*x^k)/(1-x^10).
G.f.: (10x^11-11x^10+1)/((1-x^10)(1-x)^2). (End)

Extensions

More terms from Klaus Brockhaus, May 15 2010

A053843 (Sum of digits of n written in base 8) modulo 8.

Original entry on oeis.org

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

Views

Author

Henry Bottomley, Mar 28 2000

Keywords

Comments

a(n) is the seventh row of the array in A141803. - Andrey Zabolotskiy, May 18 2016

Crossrefs

Programs

  • Mathematica
    Table[Mod[Plus @@ IntegerDigits[n, 8], 8], {n, 0, 50}] (* G. C. Greubel, Nov 02 2017 *)

Formula

a(n) = A010877(A053829(n)). - Andrey Zabolotskiy, May 18 2016

A130490 a(n) = Sum_{k=0..n} (k mod 12) (Partial sums of A010881).

Original entry on oeis.org

0, 1, 3, 6, 10, 15, 21, 28, 36, 45, 55, 66, 66, 67, 69, 72, 76, 81, 87, 94, 102, 111, 121, 132, 132, 133, 135, 138, 142, 147, 153, 160, 168, 177, 187, 198, 198, 199, 201, 204, 208, 213, 219, 226, 234, 243, 253, 264, 264, 265, 267, 270, 274, 279, 285, 292, 300
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 12, 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
    List([0..60], n-> Sum([0..n], k-> k mod 12 )); # G. C. Greubel, Sep 01 2019
  • Magma
    [&+[(k mod 12): k in [0..n]]: n in [0..60]]; // G. C. Greubel, Sep 01 2019
    
  • Maple
    seq(coeff(series(x*(1-12*x^11+11*x^12)/((1-x^12)*(1-x)^3), x, n+1), x, n), n = 0..60); # G. C. Greubel, Sep 01 2019
  • Mathematica
    Sum[Mod[k, 12], {k, 0, Range[0, 60]}] (* G. C. Greubel, Sep 01 2019 *)
    LinearRecurrence[{1,0,0,0,0,0,0,0,0,0,0,1,-1},{0,1,3,6,10,15,21,28,36,45,55,66,66},60] (* Harvey P. Dale, Jan 16 2024 *)
  • PARI
    a(n) = sum(k=0, n, k % 12); \\ Michel Marcus, Apr 29 2018
    
  • Sage
    [sum(k%12 for k in (0..n)) for n in (0..60)] # G. C. Greubel, Sep 01 2019
    

Formula

a(n) = 66*floor(n/12) + A010881(n)*(A010881(n) + 1)/2.
G.f.: (Sum_{k=1..11} k*x^k)/((1-x^12)*(1-x)).
G.f.: x*(1 - 12*x^11 + 11*x^12)/((1-x^12)*(1-x)^3).

A080063 a(n) = n mod (spf(n)+1), where spf(n) is the smallest prime dividing n (A020639).

Original entry on oeis.org

1, 2, 3, 1, 5, 0, 7, 2, 1, 1, 11, 0, 13, 2, 3, 1, 17, 0, 19, 2, 1, 1, 23, 0, 1, 2, 3, 1, 29, 0, 31, 2, 1, 1, 5, 0, 37, 2, 3, 1, 41, 0, 43, 2, 1, 1, 47, 0, 1, 2, 3, 1, 53, 0, 1, 2, 1, 1, 59, 0, 61, 2, 3, 1, 5, 0, 67, 2, 1, 1, 71, 0, 73, 2, 3, 1, 5, 0, 79, 2, 1, 1, 83, 0, 1, 2, 3, 1, 89, 0, 3, 2, 1, 1, 5, 0
Offset: 1

Views

Author

Reinhard Zumkeller, Jan 24 2003

Keywords

Comments

a(n) = 0 iff n mod 6 = 0 (A008588);
a(n) = 2 iff n mod 6 = 2 (A016933);
for n>1: a(n)=n iff n is prime (A000040, A008578).

Crossrefs

A206546 Period 8: repeat [1, 7, 11, 13, 13, 11, 7, 1].

Original entry on oeis.org

1, 7, 11, 13, 13, 11, 7, 1, 1, 7, 11, 13, 13, 11, 7, 1, 1, 7, 11, 13, 13, 11, 7, 1, 1, 7, 11, 13, 13, 11, 7, 1, 1, 7, 11, 13, 13, 11, 7, 1, 1, 7, 11, 13, 13, 11, 7, 1, 1, 7, 11, 13, 13, 11, 7, 1, 1, 7, 11, 13, 13, 11, 7, 1, 1, 7, 11, 13, 13, 11, 7, 1, 1, 7, 11, 13, 13, 11, 7, 1, 1, 7, 11, 13, 13, 11, 7, 1, 1, 7, 11, 13, 13, 11, 7, 1
Offset: 1

Views

Author

Wolfdieter Lang, Feb 10 2012

Keywords

Comments

For general Modd n (not to be confused with mod n) see a comment on A203571. The present sequence gives the residues Modd 15 of the positive odd numbers relatively prime to 15 (the positive odd numbers from all reduced residue classes mod 15), shown in A007775. The underlying periodic sequence with period length 30 is [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,0,14,13,12,11,10,9,8,7,6,5,4,3,2,1], called, with offset 0, P_15 or Modd15.

Examples

			Residues Modd 15 of the positive odd numbers relatively prime to 15:
A007775: 1, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 49, ...
Modd 15: 1, 7, 11, 13, 13, 11,  7,  1,  1,  7, 11, 13, 13, 11, ...
		

Crossrefs

Cf. A206545 and further crossrefs given there.

Programs

Formula

a(n) = A007775(n) (Modd 15) := Modd15(A007775(n)), n>=1, with the periodic sequence Modd15 (period length 30) given in the comment section.
O.g.f: x*(1+x^7+7*x*(1+x^5)+11*x^2*(1+x^3)+13*x^3*(1+x))/(1-x^8) = x*(1+x)*(1+6*x+5*x^2+8*x^3+5*x^4+6*x^5+x^6)/(1-x^8).
a(n) = -k^2 + 7k + 1 where k = (n-1) mod 8. - David A. Corneth, Aug 13 2017

A259042 Period 8 sequence [0, 1, 1, 1, 2, 1, 1, 1, ...].

Original entry on oeis.org

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

Views

Author

Michael Somos, Jun 17 2015

Keywords

Examples

			G.f. = x + x^2 + x^3 + 2*x^4 + x^5 + x^6 + x^7 + x^9 + x^10 + x^11 + ...
		

Crossrefs

Programs

  • Mathematica
    a[ n_] := {1, 1, 1, 2, 1, 1, 1, 0}[[Mod[n, 8, 1]]];
    a[ n_] := SeriesCoefficient[ 1 / (1 - x) - 1 / (1 + x^4), {x, 0, Abs@n}];
  • PARI
    {a(n) = 1 + (n%4 == 0) - 2*(n%8 == 0)};
    
  • PARI
    {a(n) = [ 0, 1, 1, 1, 2, 1, 1, 1][n%8 + 1]};
    
  • PARI
    {a(n) = polcoeff( 1 / (1 - x) - 1 / (1 + x^4) + x * O(x^abs(n)), abs(n))};

Formula

Euler transform of length 8 sequence [1, 0, 1, -1, 0, -1, 0, 1].
Moebius transform is length 8 sequence [1, 0, 0, 1, 0, 0, 0, -2].
a(n) is multiplicative with a(2) = 1, a(4) = 2, a(2^e) = 0 if e > 2, a(p^e) = 1 if p > 2.
G.f.: x * (1 + x^3)/((1-x)*(1 + x^4)).
G.f.: x * (1 - x^4)*(1 - x^6)/((1-x)*(1 - x^3)*(1 - x^8)).
G.f.: 1/(1-x) - 1/(1 + x^4).
a(n) = a(-n) = a(n+8) for all n in Z.
a(2*n + 1) = a(4*n + 2) = 1. a(8*n) = 0. a(8*n + 4) = 2.
a(n) = A257179(n+4) unless n = -4.
Dirichlet g.f.: zeta(s) * (1 + 4^(-s) - 2 * 8^(-s)). - Álvar Ibeas, Mar 18 2021

Extensions

More terms from Antti Karttunen, Jul 29 2018

A278488 a(n) = A276573(n) modulo 8.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Nov 28 2016

Keywords

Crossrefs

Programs

Formula

a(n) = A010877(A276573(n)) = A276573(n) modulo 8.
Previous Showing 21-30 of 36 results. Next