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

A047235 Numbers that are congruent to {2, 4} mod 6.

Original entry on oeis.org

2, 4, 8, 10, 14, 16, 20, 22, 26, 28, 32, 34, 38, 40, 44, 46, 50, 52, 56, 58, 62, 64, 68, 70, 74, 76, 80, 82, 86, 88, 92, 94, 98, 100, 104, 106, 110, 112, 116, 118, 122, 124, 128, 130, 134, 136, 140, 142, 146, 148, 152, 154, 158, 160, 164, 166, 170, 172, 176, 178, 182, 184, 188, 190, 194, 196, 200, 202, 206
Offset: 1

Views

Author

Keywords

Comments

Apart from initial term(s), dimension of the space of weight 2n cuspidal newforms for Gamma_0( 19 ).
Complement of A047273; A093719(a(n)) = 0. - Reinhard Zumkeller, Oct 01 2008
One could prefix an initial term "1" (or not) and define this sequence through a(n+1) = a(n) + (a(n) mod 6). See A001651 for the analog with 3, A235700 (with 5), A047350 (with 7), A007612 (with 9) and A102039 (with 10). Using 4 or 8 yields a constant sequence from that term on. - M. F. Hasler, Jan 14 2014
Nonnegative m such that m^2/6 + 1/3 is an integer. - Bruno Berselli, Apr 13 2017
Numbers divisible by 2 but not by 3. - David James Sycamore, Apr 04 2018
Numbers k for which A276086(k) is of the form 6m+3. - Antti Karttunen, Dec 03 2022

Crossrefs

Cf. A020760, A020832, A093719, A047273 (complement), A120325 (characteristic function).
Equals 2*A001651.
Cf. A007310 ((6*n+(-1)^n-3)/2). - Bruno Berselli, Jun 24 2010
Positions of 3's in A053669 and in A358840.

Programs

  • Magma
    [ n eq 1 select 2 else Self(n-1)+2*(1+n mod 2): n in [1..70] ]; // Klaus Brockhaus, Dec 13 2008
    
  • Maple
    seq(6*floor((n+1)/2) + 3 + (-1)^n, n=1..67); # Gary Detlefs, Mar 02 2010
  • Mathematica
    Flatten[Table[{6n - 4, 6n - 2}, {n, 40}]] (* Alonso del Arte, Oct 27 2014 *)
  • PARI
    a(n)=(n-1)\2*6+3+(-1)^n \\ Charles R Greathouse IV, Jul 01 2013
    
  • PARI
    first(n) = my(v = vector(n, i, 3*i - 1)); forstep(i = 2, n, 2, v[i]--); v \\ David A. Corneth, Oct 20 2017

Formula

a(n) = 2*A001651(n).
n such that phi(3*n) = phi(2*n). - Benoit Cloitre, Aug 06 2003
G.f.: 2*x*(1 + x + x^2)/((1 + x)*(1 - x)^2). a(n) = 3*n - 3/2 - (-1)^n/2. - R. J. Mathar, Nov 22 2008
a(n) = 3*n + 5..n odd, 3*n + 4..n even a(n) = 6*floor((n+1)/2) + 3 + (-1)^n. - Gary Detlefs, Mar 02 2010
a(n) = 6*n - a(n-1) - 6 (with a(1) = 2). - Vincenzo Librandi, Aug 05 2010
a(n+1) = a(n) + (a(n) mod 6). - M. F. Hasler, Jan 14 2014
Sum_{n>=1} 1/a(n)^2 = Pi^2/27. - Dimitris Valianatos, Oct 10 2017
a(n) = (6*n - (-1)^n - 3)/2. - Ammar Khatab, Aug 23 2020
Sum_{n>=1} (-1)^(n+1)/a(n) = Pi/(6*sqrt(3)). - Amiram Eldar, Dec 11 2021
E.g.f.: 2 + ((6*x - 3)*exp(x) - exp(-x))/2. - David Lovler, Aug 25 2022
From Amiram Eldar, Nov 22 2024: (Start)
Product_{n>=1} (1 - (-1)^n/a(n)) = 2/sqrt(3) (10 * A020832).
Product_{n>=1} (1 + (-1)^n/a(n)) = 1/sqrt(3) (A020760). (End)

A235700 a(n+1) = a(n) + (a(n) mod 5), a(1)=1.

Original entry on oeis.org

1, 2, 4, 8, 11, 12, 14, 18, 21, 22, 24, 28, 31, 32, 34, 38, 41, 42, 44, 48, 51, 52, 54, 58, 61, 62, 64, 68, 71, 72, 74, 78, 81, 82, 84, 88, 91, 92, 94, 98, 101, 102, 104, 108, 111, 112, 114, 118, 121, 122, 124, 128, 131, 132, 134, 138, 141, 142, 144, 148, 151, 152, 154, 158, 161, 162, 164, 168, 171, 172, 174, 178, 181, 182, 184, 188, 191
Offset: 1

Views

Author

M. F. Hasler, Jan 14 2014

Keywords

Comments

Although the present sequence has not been thought of via "writing a(n) in base b", this could be seen as "base 5" version of A102039 (base 10) and A001651 (base 3), A047235 (base 6), A047350 (base 7) and A007612 (base 9). For 4 or 8 one would get a sequence constant from that (3rd resp. 4th) term on.

Crossrefs

Programs

  • Mathematica
    NestList[#+Mod[#,5]&,1,80] (* Harvey P. Dale, Oct 20 2024 *)
  • PARI
    is_A235700(n) = bittest(278,n%10) \\ 278=2^1+2^2+2^4+2^8
    
  • PARI
    A235700 = n -> 2^((n-1)%4)+(n-1)\4*10
    
  • PARI
    print1(a=1);for(i=1,99,print1(","a+=a%5))
    
  • PARI
    Vec(x*(2*x^3+2*x^2+1)/((x-1)^2*(x^2+1)) + O(x^100)) \\ Colin Barker, Jan 16 2014

Formula

a(n) = 2^(n-1 mod 4) + 10*floor((n-1)/4).
From Colin Barker, Jan 16 2014: (Start)
a(n) = (-10+(1+2*i)*(-i)^n+(1-2*i)*i^n+10*n)/4 where i=sqrt(-1).
a(n) = 2*a(n-1)-2*a(n-2)+2*a(n-3)-a(n-4).
G.f.: x*(2*x^3+2*x^2+1) / ((x-1)^2*(x^2+1)). (End)
E.g.f.: (4 + 5*exp(x)*(x - 1) + cos(x) + 2*sin(x))/2. - Stefano Spezia, Feb 22 2025

A102718 a(n) = a(n-1) + (sum of the last two digits of the sequence so far); a(0)=0; a(1)=1.

Original entry on oeis.org

0, 1, 2, 5, 12, 15, 21, 24, 30, 33, 39, 51, 57, 69, 84, 96, 111, 113, 117, 125, 132, 137, 147, 158, 171, 179, 195, 209, 218, 227, 236, 245, 254, 263, 272, 281, 290, 299, 317, 325, 332, 337, 347, 358, 371, 379, 395, 409, 418, 427, 436, 445, 454, 463, 472, 481, 490, 499, 517, 525, 532, 537, 547, 558, 571
Offset: 0

Views

Author

Eric Angelini, Feb 06 2005

Keywords

Examples

			96 + (9 + 6) = 111;
111 + (1 + 1) = 113;
113 + (1 + 3) = 117.
		

Crossrefs

Cf. A102039.

Programs

  • Mathematica
    Join[{0,1,2,5},NestList[#+Total[Take[IntegerDigits[#],-2]]&,12,60]] (* Harvey P. Dale, May 11 2018 *)
  • PARI
    first(n) = {n = max(n, 5); res = [0, 1, 2, 5, 12]; res = concat(res, vector(n - 5)); for(i = 6, min(n, 37), res[i] = res[i-1] + vecsum(digits(res[i-1] % 100)));
    for(i = 38, n, res[i] = res[i - 20] + 200); res} \\ David A. Corneth, May 11 2018

Formula

a(n + 20) = 200 + a(n) for n > 17. - David A. Corneth, May 11 2018

Extensions

Corrected and extended by Harvey P. Dale, May 11 2018

A102719 a(n) = a(n-1) + (sum of the last three digits of the sequence so far); a(0)=0; a(1)=1; a(2)=2 and a(n) < a(n+1).

Original entry on oeis.org

0, 1, 2, 5, 13, 22, 29, 42, 57, 71, 86, 101, 103, 107, 115, 122, 127, 137, 148, 161, 169, 185, 199, 218, 229, 242, 250, 257, 271, 281, 292, 305, 313, 320, 325, 335, 346, 359, 376, 392, 406, 416, 427, 440, 448, 464, 478, 497, 517, 530, 538, 554, 568, 587, 607
Offset: 0

Views

Author

Eric Angelini, Feb 06 2005

Keywords

Examples

			86+(1+8+6) = 101.
101+(1+0+1) = 103.
103+(1+0+3) = 107.
		

Crossrefs

Cf. A102039.

Programs

  • Maple
    a:= proc(n) option remember; local k, i; if n<2 then n elif n=2 then b(2):= [2,1,0]; 2 else k:= a(n-1) +add (i, i=b(n-1)); b(n):= [convert (k, base, 10)[], b(n-1)[]][1..3]; k fi end: seq (a(n), n=0..80); # Alois P. Heinz, Aug 13 2009
  • Mathematica
    nxt[{a_,b_,c_}]:={b,c,c+Total[Take[Flatten[Join[IntegerDigits[a],IntegerDigits[b],IntegerDigits[c]]],-3]]}; NestList[nxt,{0,1,2},60][[;;,1]] (* Harvey P. Dale, Mar 13 2025 *)

Extensions

Corrected and extended by Alois P. Heinz, Aug 13 2009

A235699 a(n+1) = a(n) + (a(n) mod 10) + 1, a(0) = 0.

Original entry on oeis.org

0, 1, 3, 7, 15, 21, 23, 27, 35, 41, 43, 47, 55, 61, 63, 67, 75, 81, 83, 87, 95, 101, 103, 107, 115, 121, 123, 127, 135, 141, 143, 147, 155, 161, 163, 167, 175, 181, 183, 187, 195, 201, 203, 207, 215, 221, 223, 227, 235, 241, 243, 247, 255, 261, 263, 267, 275, 281, 283, 287, 295, 301, 303, 307, 315, 321, 323, 327, 335, 341, 343, 347, 355
Offset: 0

Views

Author

M. F. Hasler, Jan 14 2014

Keywords

Comments

Instead of (a(n) mod 10) one might say "the last (decimal) digit of a(n)".
Apart from the initial term, the first differences form the periodic sequence (2,4,8,6)[repeated].
Without the final "+ 1" and starting with 1, one gets A102039: Indeed, the last digit cycles through 2,4,8,6 and therefore the sequence never becomes constant.

Crossrefs

Programs

  • Mathematica
    NestList[#+Mod[#,10]+1&,0,80] (* or *) Join[{0},LinearRecurrence[{2,-2,2,-1},{1,3,7,15},80]] (* Harvey P. Dale, Dec 21 2014 *)
  • PARI
    print1(a=0);for(i=1,99,print1(","a+=a%10+1))

Formula

a(n) = 5*n-6+cos(n*Pi/2)+2*sin(n*Pi/2), for n>0. - Giovanni Resta, Jan 15 2014
From Colin Barker, Jan 16 2014: (Start)
a(n) = -6+(1/2+i)*(-i)^n+(1/2-i)*i^n+5*n for n>0 where i=sqrt(-1).
a(n) = 2*a(n-1)-2*a(n-2)+2*a(n-3)-a(n-4) for n>4.
G.f.: x*(5*x^3+3*x^2+x+1) / ((x-1)^2*(x^2+1)). (End)
Showing 1-5 of 5 results.