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

A003059 k appears 2k-1 times. Also, square root of n, rounded up.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

n+1 first appears in the sequence at the A002522(n)-th entry (since the ultimate occurrence of n is n^2). a(n) refers to the greatest minimal length of monotone subsequence (i.e.either increasing or decreasing) contained within any sequence of n distinct numbers,according to the Erdős-Szekeres theorem. - Lekraj Beedassy, May 20 2003
With offset 0, apparently the least k such that binomial(2n,n-k) < (1/e) binomial(2n,n). - T. D. Noe, Mar 12 2009
a(n) is the number of nonnegative integer solutions of equation x + y^2 = n - 1. - Ran Pan, Oct 02 2015
Also the burning number of the cycle graph C_n (for n >= 4) and the path graph (for n >= 1). - Eric W. Weisstein, Jan 10 2024

Crossrefs

Programs

  • Haskell
    a003059 n = a003059_list !! (n-1)
    a003059_list = concat $ zipWith ($) (map replicate [1,3..]) [1..]
    -- Reinhard Zumkeller, Mar 18 2011
    
  • Magma
    [Ceiling(Sqrt(n)): n in [1..100]]; // G. C. Greubel, Nov 14 2018
    
  • Maple
    A003059:=n->ceil(sqrt(n)); seq(A003059(k), k=1..100); # Wesley Ivan Hurt, Nov 08 2013
  • Mathematica
    Table[ Table[n, {2n - 1}], {n, 1, 10}] // Flatten (* Jean-François Alcover, Jun 10 2013 *)
    Ceiling[Sqrt[Range[100]]] (* G. C. Greubel, Nov 14 2018 *)
    Table[PadRight[{},2k-1,k],{k,10}]//Flatten (* Harvey P. Dale, Jun 07 2020 *)
  • PARI
    a(n)=if(n<1,0,1+sqrtint(n-1))
    
  • Python
    from math import isqrt
    def A003059(n): return isqrt(n-1)+1 # Chai Wah Wu, Nov 14 2022
  • Sage
    [ceil(sqrt(n)) for n in (1..100)] # G. C. Greubel, Nov 14 2018
    

Formula

a(n) = ceiling(sqrt(n)).
G.f.: (Sum_{n>=0} x^(n^2)) * x/(1-x). - Michael Somos, May 03 2003
a(n) = Sum_{k=0..n-1} A010052(k). - Reinhard Zumkeller, Mar 01 2009
Sum_{n>=1} (-1)^(n+1)/a(n) = log(2) (A002162). - Amiram Eldar, Sep 29 2022

Extensions

Name edited by M. F. Hasler, Nov 13 2018

A157464 Number of distinct squares when inserting at most one digit in decimal representation of n.

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Mar 01 2009

Keywords

Comments

a(A157465(n)) > 0; a(A000290(n)) > 0.

Examples

			a(25) = #{25=5^2, 225=15^2, 256=16^2, 625=25^2} = 4;
a(26) = #{256=16^2} = 1;
a(27) = #{} = 0;
a(28) = #{289=17^2} = 1;
a(29) = #{289=17^2, 529=23^2, 729=27^2} = 3.
		

Crossrefs

Programs

A157465 Numbers seen as squares with at most one missing digit in decimal representation.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 8, 9, 10, 11, 12, 14, 16, 19, 21, 22, 24, 25, 26, 28, 29, 31, 32, 34, 36, 40, 41, 44, 48, 49, 52, 56, 57, 59, 61, 62, 64, 65, 66, 67, 69, 72, 74, 76, 78, 79, 81, 84, 89, 90, 91, 96, 100, 102, 104, 108, 109, 115, 116, 121, 122, 124, 125, 126, 129, 136
Offset: 1

Views

Author

Reinhard Zumkeller, Mar 01 2009

Keywords

Comments

A157464(a(n)) > 0; A000290(n) is a subsequence;
A157466 gives numbers of these numbers <= n, A157466(a(n+1))=A157466(a(n))+1.

Examples

			Insert 5 into 200: 2500=50^2, therefore 200 is a term;
insert 4 into 201: 2401=49^2, therefore 201 is a term;
append 5 to 202: 2025=45^2, therefore 202 is a term.
		
Showing 1-3 of 3 results.