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

A168535 Primes in A028359.

Original entry on oeis.org

2, 1212121, 12121212121, 1212121212121212121212121212121212121212121
Offset: 1

Views

Author

Zak Seidov, Nov 28 2009

Keywords

Comments

Except for the first term, each term must both begin and end with a "1" because each term greater than 2 must end in a "1" and if a term begins with a "2" the sum of the digits of the term will be divisible by 3 and thus the term is not a prime. - Harvey P. Dale, Jun 22 2019
The next term (a(5)) has 139 digits and a(6) has 627 digits. - Harvey P. Dale, Jun 22 2019

Crossrefs

Cf. A028359.

Programs

  • Mathematica
    Join[{2},Select[Table[FromDigits[PadRight[{},2n+1,{1,2}]],{n,30}],PrimeQ]] (* Harvey P. Dale, Jun 22 2019 *)

A004396 One even number followed by two odd numbers.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Maximal number of points on a triangular grid of edge length n-1 with no 2 points on same row, column, or diagonal. See Problem 252 in The Inquisitive Problem Solver. - R. K. Guy [Comment revised by N. J. A. Sloane, Jul 01 2016]
See also Problem C2 of 2009 International Mathematical Olympiad. - Ruediger Jehn, Oct 19 2021
Dimension of the space of weight 2n+4 cusp forms for Gamma_0(3).
Starting at 3, 3, ..., gives maximal number of acute angles in an n-gon. - Takenov Nurdin (takenov_vert(AT)e-mail.ru), Mar 04 2003
Let b(1) = b(2) = 1, b(k) = b(k-1)+( b(k-2) reduced (mod 2)); then a(n) = b(n-1). - Benoit Cloitre, Aug 14 2002
(1+x+x^2+x^3 ) / ( (1-x^2)*(1-x^3)) is the Poincaré series [or Poincare series] (or Molien series) for Sigma_4.
For n > 6, maximum number of knight moves to reach any square from the corner of an (n-2) X (n-2) chessboard. Likewise for n > 6, the maximum number of knight moves to reach any square from the middle of an (2n-5) X (2n-5) chessboard. - Ralf Stephan, Sep 15 2004
A transform of the Jacobsthal numbers A001045 under the mapping of g.f.s g(x)->g(x/(1+x^2)). - Paul Barry, Jan 16 2005
For n >= 1; a(n) = number of successive terms of A040001 that add to n; or length of n-th term of A028359. - Jaroslav Krizek, Mar 28 2010
For n > 0: a(n) = length of n-th row in A082870. - Reinhard Zumkeller, Apr 13 2014
Also the independence number of the n-triangular honeycomb queen graph. - Eric W. Weisstein, Jul 14 2017
In a game of basketball points can be accumulated by making field goals (two or three points) or free throws (one point). a(n) is the number of different ways to score n-1 points. For example, a score of 4 can be achieved in 3 different ways, with 2 shots (3+1 or 2+2), 3 shots (2+1+1) or 4 shots (1+1+1+1), so a(5) = 3. - Ivan N. Ianakiev, Mar 31 2025

Examples

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

References

  • J. Kurschak, Hungarian Mathematical Olympiads, 1976, Mir, Moscow.
  • Paul Vanderlind, Richard K. Guy, and Loren C. Larson, The Inquisitive Problem Solver, MAA, 2002. See Problem 252.

Crossrefs

Programs

  • Haskell
    a004396 n = a004396_list !! n
    a004396_list = 0 : 1 : 1 : map (+ 2) a004396_list
    -- Reinhard Zumkeller, Nov 06 2012
    
  • Magma
    [(Floor(n/3) + Ceiling(n/3)): n in [0..70]]; // Vincenzo Librandi, Aug 07 2011
    
  • Maple
    A004396:=n->floor((2*n + 1)/3); seq(A004396(n), n=0..100); # Wesley Ivan Hurt, Nov 30 2013
  • Mathematica
    Table[Floor[(2 n + 1)/3], {n, 0, 75}]
    With[{n = 50}, Riffle[Range[0, n], Range[1, n, 2], {3, -1, 3}]] (* Harvey P. Dale, May 14 2015 *)
    CoefficientList[Series[(x + x^3)/((1 - x) (1 - x^3)), {x, 0, 71}], x] (* Michael De Vlieger, Oct 27 2016 *)
    a[ n_] := Quotient[2 n + 1, 3]; (* Michael Somos, Oct 23 2017 *)
    a[ n_] := Sign[n] SeriesCoefficient[ (x + x^3) / ((1 - x) (1 - x^3)), {x, 0, Abs@n}]; (* Michael Somos, Oct 23 2017 *)
    LinearRecurrence[{1, 0, 1, -1}, {1, 1, 2, 3}, {0, 20}] (* Eric W. Weisstein, Jul 14 2017 *)
    f[-1]=0; f[n_]:=Length[Union[Plus@@@FrobeniusSolve[{1,2,3},n]]]; f/@Range[-1,100] (* Ivan N. Ianakiev, Mar 31 2025 *)
  • PARI
    a(n)=2*n\/3 \\ Charles R Greathouse IV, Apr 17 2012
    
  • Sage
    def a(n) : return( dimension_cusp_forms( Gamma0(3), 2*n+4) ); # Michael Somos, Jul 03 2014

Formula

G.f.: (x+x^3)/((1-x)*(1-x^3)).
a(n) = floor( (2*n + 1)/3 ).
a(n) = a(n-1) + (1/2)*((-1)^floor((4*n+2)/3) + 1), a(0) = 0. - Mario Catalani (mario.catalani(AT)unito.it), Oct 20 2003
a(n) = 2n/3 - cos(2*Pi*n/3 + Pi/3)/3 + sqrt(3)*sin(2*Pi*n/3 + Pi/3)/9. - Paul Barry, Mar 18 2004
a(n) = A096777(n+1) - A096777(n) for n > 0. - Reinhard Zumkeller, Jul 09 2004
From Paul Barry, Jan 16 2005: (Start)
G.f.: x*(1+x^2)/(1-x-x^3+x^4).
a(n) = a(n-1) + a(n-3) - a(n-4) for n>3.
a(n) = Sum_{k = 0..n} binomial(n-k-1, k)*(-1)^k*A001045(n-2k). (End)
a(n) = (A006369(n) - (A006369(n) mod 2) * (-1)^(n mod 3)) / (1 + A006369(n) mod 2). - Reinhard Zumkeller, Jan 23 2005
a(n) = A004773(n) - A004523(n). - Reinhard Zumkeller, Aug 29 2005
a(n) = floor(n/3) + ceiling(n/3). - Jonathan Vos Post, Mar 19 2006
a(n+1) = A008620(2n). - Philippe Deléham, Dec 14 2006
a(A032766(n)) = n. - Reinhard Zumkeller, Oct 30 2009
a(n) = floor((2*n^2+4*n+2)/(3*n+4)). - Gary Detlefs, Jul 13 2010
Euler transform of length 4 sequence [1, 1, 1, -1]. - Michael Somos, Jul 03 2014
a(n) = n - floor((n+1)/3). - Wesley Ivan Hurt, Sep 17 2015
a(n) = A092200(n) - floor((n+5)/3). - Filip Zaludek, Oct 27 2016
a(n) = -a(-n) for all n in Z. - Michael Somos, Oct 30 2016
E.g.f.: (2/9)*(3*exp(x)*x + sqrt(3)*exp(-x/2)*sin(sqrt(3)*x/2)). - Stefano Spezia, Sep 20 2022
Sum_{n>=1} (-1)^(n+1)/a(n) = log(2)/2. - Amiram Eldar, Sep 29 2022

A321225 Break the infinite word 1232112321... into chunks so that the sum of the digits in the n-th chunk is n.

Original entry on oeis.org

1, 2, 3, 211, 23, 2112, 3211, 2321, 12321, 123211, 232112, 321123, 21123211, 2321123, 211232112, 321123211, 232112321, 1232112321, 12321123211, 23211232112, 32112321123, 2112321123211, 232112321123, 21123211232112, 32112321123211, 23211232112321, 123211232112321
Offset: 1

Views

Author

Seiichi Manyama, Oct 31 2018

Keywords

Comments

For every n=3*k, a(n) must be divisible by 3 and is therefore a palindrome. - Ivan N. Ianakiev, Nov 01 2018
For every n=3*k, the number of digits of a(n) equals he number of digits of a(n-9)+5 and the starting/ending digits of a(n) and a(n-9) are the same. For any possible natural number m, there are five possible candidate numbers for a(3*k) that are of length m, of which only one, the palindrome, is divisible by 3. - Ivan N. Ianakiev, Nov 02 2018

Examples

			1, 2, 3, 2+1+1=4, 2+3=5, 2+1+1+2=6, 3+2+1+1=7, 2+3+2+1=8, 1+2+3+2+1=9, ... .
		

Crossrefs

Programs

  • PARI
    getd(n) = {my(m = n % 5); if (!m, m = 1); [1, 2, 3, 2, 1][m];}
    lista(nn) = {my(k = 1); for (n=1, nn, my (s = 0, list = List(), d); while (s != n, d = getd(k); listput(list, d); s += d; k++;); print1(fromdigits(Vec(list)), ", "););} \\ Michel Marcus, Nov 11 2018

Formula

Conjectures from Chai Wah Wu, Apr 18 2024: (Start)
a(n) = 100001*a(n-9) - 100000*a(n-18) for n > 18.
G.f.: x*(10000*x^16 + 20000*x^15 + 30000*x^14 + 21100*x^13 + 23000*x^12 + 21120*x^11 + 32110*x^10 + 23210*x^9 + 12321*x^8 + 2321*x^7 + 3211*x^6 + 2112*x^5 + 23*x^4 + 211*x^3 + 3*x^2 + 2*x + 1)/(100000*x^18 - 100001*x^9 + 1). (End)

A120449 Array by antidiagonals of all primitive Orloj clock striking sequences.

Original entry on oeis.org

1, 11, 1, 111, 2, 1, 1111, 12, 2, 1, 11111, 121, 21, 2, 1, 111111, 212, 22, 3, 2, 1, 1111111, 1212, 122, 112, 3, 2, 1, 11111111, 12121, 1221, 311, 31, 12, 11, 1, 111111111, 21212, 2212, 231, 23, 4, 3, 2, 1, 1111111111, 121212, 21221, 1231, 312
Offset: 1

Views

Author

Keywords

Comments

This is the sequences of strikes at each hour, represented by concatenation of the digits. The repeating pattern for each row is in A118382. This table eventually contains non-decimal digits. Row 47 is the first one containing a non-decimal digit.

Examples

			The table starts:
1 11 111 1111 11111 111111 ...
1 2 12 121 212 1212 ...
1 2 21 22 122 1221 ...
1 2 3 112 311 231 ...
1 2 3 31 23 312 ...
		

Crossrefs

Showing 1-4 of 4 results.