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-9 of 9 results.

A115274 a(n) = n + A115273(n), where A115273(n) = 0 for n = 1..3.

Original entry on oeis.org

1, 2, 3, 5, 7, 6, 9, 12, 9, 13, 17, 12, 17, 22, 15, 21, 27, 18, 25, 32, 21, 29, 37, 24, 33, 42, 27, 37, 47, 30, 41, 52, 33, 45, 57, 36, 49, 62, 39, 53, 67, 42, 57, 72, 45, 61, 77, 48, 65, 82, 51, 69, 87, 54, 73, 92, 57, 77, 97, 60, 81, 102, 63, 85, 107, 66, 89, 112, 69, 93, 117
Offset: 1

Views

Author

Zak Seidov, Jan 18 2006

Keywords

Comments

Three arithmetic progressions interlaced: a(1..3) = 1..3 and d = a(n+3)-a(n) = 4,5,3.

Crossrefs

Cf. A115273.

Programs

  • Maple
    seq(op([1+4*j,2+5*j,3+3*j]),j=0..100); # Robert Israel, May 11 2015
  • Mathematica
    Table[n+Floor[n/3]*Mod[n, 3], {n, 78}]
    LinearRecurrence[{0,0,2,0,0,-1},{1,2,3,5,7,6},80] (* Harvey P. Dale, Aug 06 2021 *)
  • PARI
    Vec(x*(3*x^4+3*x^3+3*x^2+2*x+1) / ((x-1)^2*(x^2+x+1)^2) + O(x^100)) \\ Colin Barker, May 11 2015

Formula

a(n) = n+floor(n/3)*(n mod 3), n = 1, 2, ...
a(n) = 2*a(n-3)-a(n-6). - Colin Barker, May 11 2015
G.f.: x*(3*x^4+3*x^3+3*x^2+2*x+1) / ((x-1)^2*(x^2+x+1)^2). - Colin Barker, May 11 2015
E.g.f.: (-5+12*x)*exp(x)/9 + (3+2*x)*sqrt(3)*exp(-x/2)*sin(sqrt(3)*x/2)/9 + 5*exp(-x/2)*cos(sqrt(3)*x/2)/9. - Robert Israel, May 11 2015

A142150 The nonnegative integers interleaved with 0's.

Original entry on oeis.org

0, 0, 1, 0, 2, 0, 3, 0, 4, 0, 5, 0, 6, 0, 7, 0, 8, 0, 9, 0, 10, 0, 11, 0, 12, 0, 13, 0, 14, 0, 15, 0, 16, 0, 17, 0, 18, 0, 19, 0, 20, 0, 21, 0, 22, 0, 23, 0, 24, 0, 25, 0, 26, 0, 27, 0, 28, 0, 29, 0, 30, 0, 31, 0, 32, 0, 33, 0, 34, 0, 35, 0, 36, 0, 37, 0, 38, 0, 39, 0, 40, 0, 41, 0, 42, 0, 43, 0
Offset: 0

Views

Author

Reinhard Zumkeller, Jul 15 2008

Keywords

Comments

Number of vertical pairs in a wheel with n equal sections. - Wesley Ivan Hurt, Jan 22 2012
Number of even terms of n-th row in the triangles A162610 and A209297. - Reinhard Zumkeller, Jan 19 2013
Also the result of writing n-1 in base 2 and multiplying the last digit with the number with its last digit removed. See A115273 and A257844-A257850 for generalization to other bases. - M. F. Hasler, May 10 2015
Also follows the rule: a(n+1) is the number of terms that are identical with a(n) for a(0..n-1). - Marc Morgenegg, Jul 08 2019

Crossrefs

Programs

Formula

a(n) = XOR{k AND (n-k): 0<=k<=n}.
a(n) = (n/2)*0^(n mod 2); a(2*n)=n and a(2*n+1)=0.
a(n) = floor(n^2/2) mod n. - Enrique Pérez Herrero, Jul 29 2009
a(n) = A027656(n-2). - Reinhard Zumkeller, Nov 05 2009
a(n) = Sum_{k=0..n} (k mod 2)*((n-k) mod 2). - Reinhard Zumkeller, Nov 05 2009
a(n+1) = A000217(n) mod A000027(n+1) = A000217(n) mod A001477(n+1). - Edgar Almeida Ribeiro (edgar.a.ribeiro(AT)gmail.com), May 19 2010
From Bruno Berselli, Oct 19 2010: (Start)
a(n) = n*(1+(-1)^n)/4.
G.f.: x^2/(1-x^2)^2.
a(n) = 2*a(n-2)-a(n-4) for n > 3.
Sum_{i=0..n} a(i) = (2*n*(n+1)+(2*n+1)*(-1)^n-1)/16 (see A008805). (End)
a(n) = -a(-n) = A195034(n-1)-A195034(-n-1). - Bruno Berselli, Oct 12 2011
a(n) = A000326(n) - A191967(n). - Reinhard Zumkeller, Jul 07 2012
a(n) = Sum_{i=1..n} floor((2*i-n)/2). - Wesley Ivan Hurt, Aug 21 2014
a(n-1) = floor(n/2)*(n mod 2), where (n mod 2) is the parity of n, or remainder of division by 2. - M. F. Hasler, May 10 2015
a(n) = A158416(n) - 1. - Filip Zaludek, Oct 30 2016
E.g.f.: x*sinh(x)/2. - Ilya Gutkovskiy, Oct 30 2016
a(n) = A000007(a(n-1)) + a(n-2) for n > 1. - Nicolas Bělohoubek, Oct 06 2024

A257850 a(n) = floor(n/10) * (n mod 10).

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 0, 3, 6, 9, 12, 15, 18, 21, 24, 27, 0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 0, 6, 12, 18, 24, 30, 36, 42, 48, 54, 0, 7, 14, 21, 28, 35, 42, 49, 56, 63, 0, 8
Offset: 0

Views

Author

M. F. Hasler, May 10 2015

Keywords

Comments

Equivalently, write n in base 10, multiply the last digit by the number with its last digit removed.
See A142150(n-1) for the base 2 analog and A257843 - A257849 for the base 3 - base 9 variants.
The first 100 terms coincide with those of A035930 (maximal product of any two numbers whose concatenation is n), A171765 (product of digits of n, or 0 for n<10), A257297 ((initial digit of n)*(n with initial digit removed)), but the sequence is of course different from each of these three.
The terms a(10) - a(100) also coincide with those of A007954 (product of decimal digits of n).

Crossrefs

Cf. A142150 (the base 2 analog), A115273, A257844 - A257849.

Programs

  • Magma
    [Floor(n/10)*(n mod 10): n in [0..100]]; // Vincenzo Librandi, May 11 2015
    
  • Mathematica
    Table[Floor[n/10] Mod[n, 10], {n, 100}] (* Vincenzo Librandi, May 11 2015 *)
  • PARI
    a(n,b=10)=(n=divrem(n,b))[1]*n[2]
    
  • Python
    def A257850(n): return n//10*(n%10) # M. F. Hasler, Sep 01 2021

Formula

a(n) = 2*a(n-10)-a(n-20). - Colin Barker, May 11 2015
G.f.: x^11*(9*x^8+8*x^7+7*x^6+6*x^5+5*x^4+4*x^3+3*x^2+2*x+1) / ((x-1)^2*(x+1)^2*(x^4-x^3+x^2-x+1)^2*(x^4+x^3+x^2+x+1)^2). - Colin Barker, May 11 2015

A257844 a(n) = floor(n/4) * (n mod 4).

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 2, 3, 0, 2, 4, 6, 0, 3, 6, 9, 0, 4, 8, 12, 0, 5, 10, 15, 0, 6, 12, 18, 0, 7, 14, 21, 0, 8, 16, 24, 0, 9, 18, 27, 0, 10, 20, 30, 0, 11, 22, 33, 0, 12, 24, 36, 0, 13, 26, 39, 0, 14, 28, 42, 0, 15, 30, 45, 0, 16, 32, 48, 0, 17, 34, 51, 0, 18, 36
Offset: 0

Views

Author

M. F. Hasler, May 10 2015

Keywords

Comments

Equivalently, write n in base 4, multiply the last digit by the number with its last digit removed.

Crossrefs

Cf. A142150 (the base-2 analog), A115273, A257845 - A257850.

Programs

  • Magma
    [Floor(n/4)*(n mod 4) : n in [0..100]]; // Wesley Ivan Hurt, Jun 22 2015
    
  • Magma
    I:=[0,0,0,0,0,1,2,3]; [n le 8 select I[n] else 2*Self(n-4)-Self(n-8): n in [1..100]]; // Vincenzo Librandi, Jun 23 2015
    
  • Maple
    A257844:=n->floor(n/4)*(n mod 4): seq(A257844(n), n=0..100); # Wesley Ivan Hurt, Jun 22 2015
  • Mathematica
    Table[Floor[n/4] Mod[n, 4], {n, 0, 100}] (* Wesley Ivan Hurt, Jun 22 2015 *)
  • PARI
    a(n,b=4)=(n=divrem(n,b))[1]*n[2]
    
  • PARI
    concat([0,0,0,0,0], Vec(x^5*(3*x^2+2*x+1) / ((x-1)^2*(x+1)^2*(x^2+1)^2) + O(x^100))) \\ Colin Barker, May 11 2015
    
  • Python
    def A257844(n): return (n>>2)*(n&3) # Chai Wah Wu, Jan 27 2023

Formula

a(n) = 2*a(n-4) - a(n-8), n > 8. - Colin Barker, May 11 2015
G.f.: x^5*(3*x^2+2*x+1) / ((x-1)^2*(x+1)^2*(x^2+1)^2). - Colin Barker, May 11 2015
a(n) = (3 - 2*(-1)^((2*n - 1 + (-1)^n)/4) - (-1)^n)*(2*n - 3 + 2*(-1)^((2*n - 1 + (-1)^n)/4) + (-1)^n)/16. - Wesley Ivan Hurt, Jun 22 2015

A257845 a(n) = floor(n/5) * (n mod 5).

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 0, 2, 4, 6, 8, 0, 3, 6, 9, 12, 0, 4, 8, 12, 16, 0, 5, 10, 15, 20, 0, 6, 12, 18, 24, 0, 7, 14, 21, 28, 0, 8, 16, 24, 32, 0, 9, 18, 27, 36, 0, 10, 20, 30, 40, 0, 11, 22, 33, 44, 0, 12, 24, 36, 48, 0, 13, 26, 39, 52, 0, 14, 28, 42, 56
Offset: 0

Views

Author

M. F. Hasler, May 10 2015

Keywords

Comments

Equivalently, write n in base 5, multiply the last digit by the number with its last digit removed.

Crossrefs

Cf. A142150 (the base 2 analog), A115273, A257844 - A257850.

Programs

  • Mathematica
    LinearRecurrence[{0,0,0,0,2,0,0,0,0,-1},{0,0,0,0,0,0,1,2,3,4},80] (* Harvey P. Dale, Aug 15 2021 *)
  • PARI
    a(n,b=5)=(n=divrem(n,b))[1]*n[2]
    
  • PARI
    concat([0,0,0,0,0,0], Vec(x^6*(4*x^3+3*x^2+2*x+1) / ((x-1)^2*(x^4+x^3+x^2+x+1)^2) + O(x^100))) \\ Colin Barker, May 11 2015

Formula

a(n) = 2*a(n-5)-a(n-10). - Colin Barker, May 11 2015
G.f.: x^6*(4*x^3+3*x^2+2*x+1) / ((x-1)^2*(x^4+x^3+x^2+x+1)^2). - Colin Barker, May 11 2015

A257849 a(n) = floor(n/9) * (n mod 9).

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 0, 2, 4, 6, 8, 10, 12, 14, 16, 0, 3, 6, 9, 12, 15, 18, 21, 24, 0, 4, 8, 12, 16, 20, 24, 28, 32, 0, 5, 10, 15, 20, 25, 30, 35, 40, 0, 6, 12, 18, 24, 30, 36, 42, 48, 0, 7, 14, 21, 28, 35, 42, 49, 56, 0, 8, 16, 24, 32, 40, 48, 56, 64, 0
Offset: 0

Views

Author

M. F. Hasler, May 10 2015

Keywords

Comments

Equivalently, write n in base 9, multiply the last digit by the number with its last digit removed.
See A142150(n-1) for the base 2 analog, and A115273, A257844 - A257850 for the base 3 - base 10 variants.

Crossrefs

Cf. A142150 (the base 2 analog), A115273, A257844 - A257850.

Programs

  • Magma
    [Floor(n/9)*(n mod 9): n in [0..100]]; // Vincenzo Librandi, May 11 2015
    
  • Mathematica
    Table[Floor[n/9] Mod[n, 9], {n, 100}] (* Vincenzo Librandi, May 11 2015 *)
  • PARI
    A257849(n)=n\9*(n%9)
    
  • PARI
    concat([0,0,0,0,0,0,0,0,0,0], Vec(x^10*(8*x^7+7*x^6+6*x^5+5*x^4+4*x^3+3*x^2+2*x+1) / ((x-1)^2*(x^2+x+1)^2*(x^6+x^3+1)^2) + O(x^100))) \\ Colin Barker, May 11 2015
    
  • Python
    from math import prod
    def A257849(n): return prod(divmod(n,9)) # Chai Wah Wu, Jan 19 2023
  • Sage
    [floor(n/9)*(n % 9)  for n in (0..80)]; # Bruno Berselli, May 11 2015
    

Formula

a(n) = 2*a(n-9)-a(n-18). - Colin Barker, May 11 2015
G.f.: x^10*(8*x^7+7*x^6+6*x^5+5*x^4+4*x^3+3*x^2+2*x+1) / ((x-1)^2*(x^2+x+1)^2*(x^6+x^3+1)^2). - Colin Barker, May 11 2015

A257846 a(n) = floor(n/6) * (n mod 6).

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 0, 2, 4, 6, 8, 10, 0, 3, 6, 9, 12, 15, 0, 4, 8, 12, 16, 20, 0, 5, 10, 15, 20, 25, 0, 6, 12, 18, 24, 30, 0, 7, 14, 21, 28, 35, 0, 8, 16, 24, 32, 40, 0, 9, 18, 27, 36, 45, 0, 10, 20, 30, 40, 50, 0, 11, 22, 33, 44, 55, 0, 12, 24
Offset: 0

Views

Author

M. F. Hasler, May 10 2015

Keywords

Comments

Equivalently, write n in base 6, multiply the last digit by the number with its last digit removed.

Crossrefs

Cf. A142150 (the base 2 analog), A115273, A257844 - A257850.

Programs

  • Mathematica
    Table[Floor[n/6]*Mod[n, 6], {n, 120}] (* Michael De Vlieger, May 11 2015 *)
  • PARI
    a(n,b=6)=(n=divrem(n,b))[1]*n[2]
    
  • PARI
    concat([0, 0, 0, 0, 0, 0, 0], Vec(x^7*(5*x^4+4*x^3+3*x^2+2*x+1) / ((x-1)^2*(x+1)^2*(x^2-x+1)^2*(x^2+x+1)^2) + O(x^100))) \\ Colin Barker, May 11 2015

Formula

a(n) = 2*a(n-6)-a(n-12). - Colin Barker, May 11 2015
G.f.: x^7*(5*x^4+4*x^3+3*x^2+2*x+1) / ((x-1)^2*(x+1)^2*(x^2-x+1)^2*(x^2+x+1)^2). - Colin Barker, May 11 2015

A257847 a(n) = floor(n/7) * (n mod 7).

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 0, 2, 4, 6, 8, 10, 12, 0, 3, 6, 9, 12, 15, 18, 0, 4, 8, 12, 16, 20, 24, 0, 5, 10, 15, 20, 25, 30, 0, 6, 12, 18, 24, 30, 36, 0, 7, 14, 21, 28, 35, 42, 0, 8, 16, 24, 32, 40, 48, 0, 9, 18, 27, 36, 45, 54, 0, 10, 20
Offset: 0

Views

Author

M. F. Hasler, May 10 2015

Keywords

Comments

Equivalently, write n in base 7, multiply the last digit by the number with its last digit removed.

Crossrefs

Cf. A194757.
Cf. A142150 (the base 2 analog), A115273, A257844 - A257850.

Programs

  • Mathematica
    Table[Floor[n/7]Mod[n,7],{n,0,80}] (* Harvey P. Dale, Nov 12 2022 *)
  • PARI
    a(n,b=7)=(n=divrem(n,b))[1]*n[2]
    
  • PARI
    concat([0,0,0,0,0,0,0,0], Vec(x^8*(6*x^5+5*x^4+4*x^3+3*x^2+2*x+1) / ((x-1)^2*(x^6+x^5+x^4+x^3+x^2+x+1)^2) + O(x^100))) \\ Colin Barker, May 11 2015

Formula

a(n) = 2*a(n-7)-a(n-14). - Colin Barker, May 11 2015
G.f.: x^8*(6*x^5+5*x^4+4*x^3+3*x^2+2*x+1) / ((x-1)^2*(x^6+x^5+x^4+x^3+x^2+x+1)^2). - Colin Barker, May 11 2015

A257848 a(n) = floor(n/8) * (n mod 8).

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 0, 2, 4, 6, 8, 10, 12, 14, 0, 3, 6, 9, 12, 15, 18, 21, 0, 4, 8, 12, 16, 20, 24, 28, 0, 5, 10, 15, 20, 25, 30, 35, 0, 6, 12, 18, 24, 30, 36, 42, 0, 7, 14, 21, 28, 35, 42, 49, 0, 8, 16, 24, 32, 40, 48, 56, 0, 9
Offset: 0

Views

Author

M. F. Hasler, May 10 2015

Keywords

Comments

Equivalently, write n in base 8, multiply the last digit by the number with its last digit removed.

Crossrefs

Cf. A142150 (the base 2 analog), A115273, A257844 - A257850.

Programs

  • Mathematica
    Table[Floor[n/8]Mod[n,8],{n,0,90}] (* or *) LinearRecurrence[{0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,-1},{0,0,0,0,0,0,0,0,0,1,2,3,4,5,6,7},90] (* Harvey P. Dale, Nov 05 2023 *)
  • PARI
    a(n,b=8)=(n=divrem(n,b))[1]*n[2]
    
  • PARI
    concat([0,0,0,0,0,0,0,0,0], Vec(x^9*(7*x^6+6*x^5+5*x^4+4*x^3+3*x^2+2*x+1) / ((x-1)^2*(x+1)^2*(x^2+1)^2*(x^4+1)^2) + O(x^100))) \\ Colin Barker, May 11 2015
    
  • Python
    def A257848(n): return (n>>3)*(n&7) # Chai Wah Wu, Jan 19 2023

Formula

a(n) = 2*a(n-8)-a(n-16). - Colin Barker, May 11 2015
G.f.: x^9*(7*x^6+6*x^5+5*x^4+4*x^3+3*x^2+2*x+1) / ((x-1)^2*(x+1)^2*(x^2+1)^2*(x^4+1)^2). - Colin Barker, May 11 2015
Showing 1-9 of 9 results.