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.

A203553 Lodumo_2 of A118175, which is n 1's followed by n 0's.

Original entry on oeis.org

1, 0, 3, 5, 2, 4, 7, 9, 11, 6, 8, 10, 13, 15, 17, 19, 12, 14, 16, 18, 21, 23, 25, 27, 29, 20, 22, 24, 26, 28, 31, 33, 35, 37, 39, 41, 30, 32, 34, 36, 38, 40, 43, 45, 47, 49, 51, 53, 55, 42, 44, 46, 48, 50, 52, 54, 57, 59, 61, 63, 65, 67, 69, 71, 56, 58, 60, 62, 64, 66, 68, 70
Offset: 0

Views

Author

Philippe Deléham, Jan 02 2012

Keywords

Comments

Permutation of nonnegative numbers.
Lodumo_k of sequences is defined in A159970.
The sequence has a natural decomposition into irregular triangle (see example). The length of row n is A008619 (n). Row sums are the cubes (A000578) interspersed with A007531.

Examples

			Triangle begins :
1
0
3, 5
2, 4
7, 9, 11
6, 8, 10
13, 15, 17, 19
12, 14, 16, 18
21, 23, 25, 27, 29
20, 22, 24, 26, 28
31, 33, 35, 37, 39, 41
30, 32, 34, 36, 38, 40
43, 45, 47, 49, 51, 53, 55
42, 44, 46, 48, 50, 52, 54
57, 59, 61, 63, 65, 67, 69, 71
56, 58, 60, 62, 64, 66, 68, 70
73, 75, 77, 79, 81, 83, 85, 87, 89
72, 74, 76, 78, 80, 82, 84, 86, 88 ...
Row sums : 1 = 1^3 ; 0 = 1^3 - 1 ; 3 + 5 = 2^3 ; 2 + 4 = 2^3 - 2 = 6 ; 7 + 9 + 11 = 3^3 = 27 ; 6 + 8 + 10 = 3^3 - 3 = 24 ; 13 + 15 + 17 + 19 = 4^3 = 64 ; 12 + 14 + 16 + 18 = 4^4 - 4 = 60 ; ...
		

Crossrefs

Formula

a(n)= Lodumo_2(A118175(n)).

A079813 n 0's followed by n 1's.

Original entry on oeis.org

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

Views

Author

Olivier Gérard, Feb 19 2003

Keywords

Comments

It appears that a(n) is the number of positive solutions to the equation x*floor(x) = n - 1 (for example, it appears x = 5/2 is the only positive solution to x*floor(x) = 5). - Melvin Peralta, Apr 13 2016
From Branko Curgus, Apr 25 2017: (Start)
a(n) is 0 if the nearest square to n is greater than or equal to n, otherwise 1.
a(n) is the number of positive solutions to the equation x*floor(x) = n - 1. (End)
{a(n)} interpreted as a string over {0,1} is the unique fixed-point of the function defined by f(0^n 1 s) = 1^(n-1) f(1 s) and f(1^n 0 s) = 0^n f(0 s). - Curtis Bechtel, Jun 27 2025

Examples

			x^2 + x^5 + x^6 + x^10 + x^11 + x^12 + x^17 + x^18 + x^19 + x^20 + ...
		

Programs

  • Maple
    A000194 := n->round(sqrt(n)):A079813 := n->(floor((n-1)/A000194(n))-A000194(n)+1);
  • Mathematica
    Table[{Table[0, n], Table[1, n]}, {n, 11}] // Flatten (* or *)
    Rest@ CoefficientList[Series[(x/(1 - x)) Sum[x^k^2 (1 - x^k), {k, 12}], {x, 0, 120}], x] (* or *)
    Table[Floor[(n - 1)/#] - # + 1 &@ Round[Sqrt@ n], {n, 120}] (* Michael De Vlieger, Apr 13 2016 *)
    Table[Ceiling[Sqrt[n]] - Round[Sqrt[n]], {n, 1, 257}] (* Branko Curgus, Apr 25 2017 *)
  • PARI
    {a(n) = if( n<1, 0, n--; m = sqrtint(n); n - m^2 < m)} /* Michael Somos, Nov 05 2011 */
    
  • Python
    from math import isqrt
    def A079813(n): return int((m:=isqrt(n))**2!=n)-int(n-m*(m+1)>=1) # Chai Wah Wu, Jul 30 2022

Formula

G.f.: (x / (1 - x)) * (Sum_{k>0} x^k^2 * (1 - x^k)). - Michael Somos, Nov 05 2011
a(n) = floor((n-1)/A000194(n)) - A000194(n)+1, where A000194(n) = round(sqrt(n)). - Antonio G. Astudillo (afg_astudillo(AT)hotmail.com), Feb 23 2003
a(n+1) = 1 - A118175(n). - Philippe Deléham, Jan 02 2012
a(n) = ceiling(sqrt(n)) - round(sqrt(n)). - Branko Curgus, Apr 26 2017

A338546 For n > 0, a(n) is the number of 1's among the first T(n) terms of the sequence 1, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0, 0, ..., k 1's, k 0's, where T(n) is the n-th triangular number.

Original entry on oeis.org

1, 2, 3, 6, 9, 11, 15, 21, 24, 28, 36, 42, 46, 55, 65, 70, 78, 91, 99, 105, 120, 133, 140, 153, 171, 180, 190, 210, 225, 234, 253, 275, 285, 300, 325, 341, 352, 378, 402, 414, 435, 465, 481, 496, 528, 553, 567, 595, 630, 645, 666, 703, 728, 744, 780, 816
Offset: 1

Views

Author

Arnauld Chevallier, Nov 02 2020

Keywords

Comments

The sequence of 1's and 0's is more formally defined as A118175.

Examples

			Equivalently, this is the number of 1's up to the n-th row of a triangle filled with A118175:
   1 (1)
   01 (2)
   100 (3)
   1110 (6)
   00111 (9)
   100001 (11)
   1111000 (15)
   00111111 (21)
   000000111 (24)
   1111000000 (28)
   01111111100 (36)
   000000111111 (42)
   ...
		

Crossrefs

Based on A118175 and A000217.

Programs

  • Mathematica
    With[{nn = 56}, Accumulate@ Map[Total, TakeList[Array[1 - Ceiling[#] + Round[#] &@ Sqrt[#] &, PolygonalNumber[nn]], Range[nn]]]] (* Michael De Vlieger, Nov 02 2020, after Branko Curgus at A118175 *)
  • PARI
    f(n) = my(r=sqrt(n)); 1 - ceil(r) + round(r);
    a(n) = sum(k=1, n*(n+1)/2, f(k)==1); \\ Michel Marcus, Nov 12 2020
Showing 1-3 of 3 results.