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-10 of 11 results. Next

A384063 Partial sums of A172471.

Original entry on oeis.org

0, 1, 3, 5, 7, 10, 13, 16, 20, 24, 28, 32, 36, 41, 46, 51, 56, 61, 67, 73, 79, 85, 91, 97, 103, 110, 117, 124, 131, 138, 145, 152, 160, 168, 176, 184, 192, 200, 208, 216, 224, 233, 242, 251, 260, 269, 278, 287, 296, 305, 315, 325, 335, 345, 355, 365, 375, 385, 395, 405, 415, 426, 437
Offset: 0

Views

Author

Hoang Xuan Thanh, May 18 2025

Keywords

Crossrefs

Programs

  • Mathematica
    Accumulate[Floor[Sqrt[2*Range[0, 100]]]] (* Paolo Xausa, Jun 04 2025 *)
  • PARI
    a(n) = sum(k=1, n, sqrtint(2*k)); \\ Michel Marcus, May 23 2025

Formula

a(n) = m*n - floor((m-1)*(m+3)*(2m-1)/12), where m = A172471(n).
a(n) = m*n - A000217(m-1) - 2*A173196(m-1), where m = A172471(n).

A082662 Numbers k such that the odd part of k is less than sqrt(2k).

Original entry on oeis.org

1, 2, 4, 6, 8, 12, 16, 20, 24, 28, 32, 40, 48, 56, 64, 72, 80, 88, 96, 104, 112, 120, 128, 144, 160, 176, 192, 208, 224, 240, 256, 272, 288, 304, 320, 336, 352, 368, 384, 400, 416, 432, 448, 464, 480, 496, 512, 544, 576, 608, 640, 672, 704, 736, 768, 800
Offset: 1

Views

Author

Naohiro Nomoto, May 18 2003

Keywords

Comments

Theorem: The following eight definitions are equivalent.
(P1) Numbers k such that the odd part of k (A000265(k)) is < sqrt(2k).
(P1) is the new definition, repeated here for convenience. Note that this is not the same as saying A000265(k) < A172471(k), since A172471(k) = floor(sqrt(2*k)).
(P2) Numbers k such that the odd divisors of k are < sqrt(2k).
(P2) and (P1) are obviously equivalent.
(P3) The numbers 1, S_0, S_1, S_2, ..., where
S_m = { 2^(m+1)*(2^m+i) : i = 0 .. 3*2^m - 1 }.
So S_0 = {2,4,6}, S_1 = {8,12,16,20,24,28}, S_2 = {32,40,48,...,120}, S_3 = {128,144,...,496}, ...
The proof that (P3) and (P1) are the same sequence is not difficult and will be added later. (P3) is equivalent to a formula stated without proof (it may have been only an empirical observation) in the original version of this entry.
(P4) Numbers k such that the odd part of k is <= A003056(k).
That is, the odd part of k is <= floor((sqrt(1+8*n)-1)/2). It is more difficult to show this is equivalent to (P1), but it is true.
(P5) Numbers k such that the odd divisors of k are <= A003056(k).
(P5) and (P4) are obviously equivalent.
(P6) Numbers k such that A001227(k) = A082647(k).
(P6) was the original definition. In words, it says that the number of odd divisors of k is equal to the number of ways to write k as a sum of an odd number of consecutive positive integers, or equivalently as a sum of d consecutive positive integers for some d dividing k. To show that (P6) is equivalent to (P1) one makes use of the Hirschhorn-Hirschhorn article.
(P7) Numbers k such that the odd part of k is <= the sum of divisors of the even part.
(P7) was contributed by Jaycob Coleman, Jun 21 2014. To show (P7) is equivalent to (P1), write k as 2^m*s where s is odd. Equality holds if and only if k is an even perfect number.
(P8) Numbers k such that A000265(k) <= A000203(A006519(k)) or also such that A000265(k) <= A038712(k).
(P8) was contributed by Michel Marcus, Aug 14 2014. It is a restatement of (P7).
(End of theorem)
A further equivalent property, (P9), follows at once from (P4). This was conjectured by Omar E. Pol, Apr 18 2017
(P9) These are the numbers k such that the sequence of successive widths in the symmetric representation of sigma(k) is unimodal.
Yet another equivalent property:
(P10) Numbers k >= 1 such if k = i + (i+1) + (i+2) + ... + (i+j-1) for some i >= 1 and j >= 1 then j is odd [Caballero, 2019]. - Michel Marcus, Jan 16 2020
This is a subsequence of A005153. - Jaycob Coleman, Jun 21 2014
The complement of this sequence is A281005. - Omar E. Pol, Apr 18 2017
Subsequence of A174973. - Omar E. Pol, Feb 01 2021

Crossrefs

Programs

  • Mathematica
    cnt[n_] := DivisorSum[n, Boole[OddQ[#] && #>Sqrt[2n]]&]; Select[Range[800], cnt[#]==0&] (* Jean-François Alcover, Feb 16 2017 *)
  • PARI
    isok(n) = my(q = sqrt(2*n)); (sumdiv(n, d, (d%2) && (d < q)) == sumdiv(n, d, d%2)); \\ Michel Marcus, Jul 04 2014

Formula

G.f. = 1 + (1/(1-x)^2) * Sum_{m >= 0} (2^(m+1)*x^(3*2^m-2) * ( x^(3*2^m)*(2^(m+2)*(x-1)-x) - 2^m*(x-1) + x ) ). (This follows from (P3).) :w
- N. J. A. Sloane, Feb 02 2021
a(n+1) = a(n) + A053644(A000196(2*a(n))). - Peter Munn, Oct 03 2023

Extensions

Edited by N. J. A. Sloane, Jan 28 2021: Replaced original indirect definition by simple direct definition; rearranged comments; provided proofs (not yet included here) that the various definitions are equivalent

A053616 Pyramidal sequence: distance to nearest triangular number.

Original entry on oeis.org

0, 0, 1, 0, 1, 1, 0, 1, 2, 1, 0, 1, 2, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6, 6, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6, 7, 6, 5, 4, 3, 2, 1
Offset: 0

Views

Author

Henry Bottomley, Mar 20 2000

Keywords

Comments

From Wolfdieter Lang, Oct 24 2020: (Start)
If this sequence is written with offset 1 as a number triangle T(n, k), with n the length of row n, for n >= 1, then row n gives the primitive period of the periodic sequence {k (mod* n)}_{k>=0}, where k (mod* n) = k (mod n) if k <= floor(n/2) and otherwise it is -k (mod n). Such a modified modular relation mod* n has been used by Brändli and Beyne, but for integers relative prime to n.
These periodic sequences are given in A000007, A000035, A011655, A007877, |A117444|, A260686, A279316, for n = 1, 2, ..., 7. For n = 10 A271751, n = 12 A271832, n = 14 A279313. (End)

Examples

			a(12) = |12 - 10| = 2 since 10 is the nearest triangular number to 12.
From _M. F. Hasler_, Dec 06 2019: (Start)
Ignoring a(0) = 0, the sequence can be written as triangle indexed by m >= k >= 1, in which case the terms are (m - |k - |m-k||)/2, as follows:
   0,      (Row 0: ignore)
   0,      (Row m=1, k=1: For k=m, m - |k - |m-k|| = m - |m - 0| = 0.)
   1, 0,        (Row m=2: for k=1, |m-k| = 1, k-|m-k| = 0, m-0 = 2, (...)/2 = 1.)
   1, 1, 0,
   1, 2, 1, 0,    (Row m=4: for k=2, we have twice the value of (m=2, k=1) => 2.)
   1, 2, 2, 1, 0,
   (...)
This is related to the non-associative operation A049581(x,y) = |x - y| =: x @ y. Specifically, @ is commutative and any x is its own inverse, so non-associativity of @ can be measured through the commutator ((x @ y) @ y) @ x which equals twice the element indexed {m,k} = {x,y} in the above triangle.
(End)
		

Crossrefs

a(n) = abs(A305258(n)).

Programs

  • Mathematica
    a[n_] := (k =.; k = Reduce[k > 0 && k*(k+1)/2 == n, Reals][[2]] // Floor; Min[(k+1)*(k+2)/2 - n, n - k*(k+1)/2]); Table[a[n], {n, 0, 104}] (* Jean-François Alcover, Jan 08 2013 *)
    Module[{trms=120,t},t=Accumulate[Range[Ceiling[(Sqrt[8*trms+1]-1)/2]]]; Join[{0},Flatten[Table[Abs[Nearest[t,n][[1]]-n],{n,trms}]]]] (* Harvey P. Dale, Nov 08 2013 *)
  • PARI
    print1(x=0, ", ");for(stride=1,13,x+=stride;y=x+stride+1;for(k=x,y-1,print1(min(k-x,y-k), ", "))) \\ Hugo Pfoertner, Jun 02 2018
    
  • PARI
    apply( {a(n)=if(n,-abs(n*2-(n=sqrtint(8*n-7)\/2)^2)+n)\2}, [0..40]) \\ same as (i - |j - |i-j||)/2 with i=sqrtint(8*n-7)\/2, j=n-i(i-1)/2. - M. F. Hasler, Dec 06 2019
    
  • Python
    from math import isqrt
    def A053616(n): return abs((m:=isqrt(k:=n<<1))*(m+1)-k)>>1 # Chai Wah Wu, Jul 15 2022

Formula

a(n) = (x - |y - |x-y||)/2, when (x,y) is the n-th element in the triangle x >= y >= 1. - M. F. Hasler, Dec 06 2019
a(n) = (1/2)*abs(t^2 + t - 2*n), where t = floor(sqrt(2*n)) = A172471. - Ridouane Oudra, Dec 15 2021
From Ctibor O. Zizka, Nov 12 2024: (Start)
For s >= 1, t from [0, s] :
a(2*s^2 + t) = s - t.
a(2*s^2 - t) = s - t.
a(2*s^2 + 2*s - t) = s - t.
a(2*s^2 + 2*s + 1 + t) = s - t. (End)

A103128 a(n) = floor(sqrt(2n-1)).

Original entry on oeis.org

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

Views

Author

Giovanni Teofilatto, Mar 17 2005

Keywords

Comments

n appears 2 * ceiling(n/2) times.

Crossrefs

Programs

Formula

From Robert Israel, Sep 12 2016: (Start)
a(n+1) = a(n)+1 for n in A007590, otherwise a(n+1) = a(n).
G.f.: x*Theta3(x^2)/(2*(1-x)) + sqrt(x)*Theta2(x^2)/(2*(1-x)) - x/(2*(1-x)), where Theta2 and Theta3 are Jacobi Theta functions. (End)

Extensions

Edited by Franklin T. Adams-Watters, Apr 20 2010
New name from Wesley Ivan Hurt, Nov 26 2020

A202304 a(n) = floor(sqrt(3*n)).

Original entry on oeis.org

0, 1, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14
Offset: 0

Views

Author

Vincenzo Librandi, Jan 17 2012

Keywords

Crossrefs

Programs

  • Magma
    [Isqrt(3*n) : n in [0..80]];
    
  • Mathematica
    Table[Floor[Sqrt[3n]],{n,0,80}]
  • PARI
    a(n)=sqrtint(3*n) \\ Charles R Greathouse IV, Jan 17 2012

Formula

a(n) = A000196(3n), a(n)^2 = A048760(3n). - Bruno Berselli, Jan 18 2012

A202305 a(n) = floor(sqrt(5*n)).

Original entry on oeis.org

0, 2, 3, 3, 4, 5, 5, 5, 6, 6, 7, 7, 7, 8, 8, 8, 8, 9, 9, 9, 10, 10, 10, 10, 10, 11, 11, 11, 11, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 17, 17, 17, 18
Offset: 0

Views

Author

Vincenzo Librandi, Jan 17 2012

Keywords

Crossrefs

Programs

  • Magma
    [Floor(Sqrt(5*n)) : n in [0..80]];
    
  • Mathematica
    Table[Floor[Sqrt[5n]],{n,0,80}]
  • PARI
    a(n)=sqrtint(5*n) \\ Charles R Greathouse IV, Jan 17 2012

Formula

a(n) = A000196(5n).

A202306 a(n) = floor(sqrt(7*n)).

Original entry on oeis.org

0, 2, 3, 4, 5, 5, 6, 7, 7, 7, 8, 8, 9, 9, 9, 10, 10, 10, 11, 11, 11, 12, 12, 12, 12, 13, 13, 13, 14, 14, 14, 14, 14, 15, 15, 15, 15, 16, 16, 16, 16, 16, 17, 17, 17, 17, 17, 18, 18, 18, 18, 18, 19, 19, 19, 19, 19, 19, 20, 20, 20, 20, 20, 21, 21, 21, 21, 21, 21
Offset: 0

Views

Author

Vincenzo Librandi, Jan 17 2012

Keywords

Crossrefs

Programs

  • Magma
    [Floor(Sqrt(7*n)) : n in [0..80]];
    
  • Mathematica
    Table[Floor[Sqrt[7n]],{n,0,80}]
  • PARI
    a(n)=sqrtint(7*n) \\ Charles R Greathouse IV, Jan 17 2012

Formula

a(n) = A000196(7*n).

A202307 a(n) = floor(sqrt(11*n)).

Original entry on oeis.org

0, 3, 4, 5, 6, 7, 8, 8, 9, 9, 10, 11, 11, 11, 12, 12, 13, 13, 14, 14, 14, 15, 15, 15, 16, 16, 16, 17, 17, 17, 18, 18, 18, 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 22, 22, 22, 22, 22, 23, 23, 23, 23, 24, 24, 24, 24, 25, 25, 25, 25, 25, 26, 26, 26, 26, 26, 27
Offset: 0

Views

Author

Vincenzo Librandi, Jan 17 2012

Keywords

Crossrefs

Programs

  • Magma
    [Floor(Sqrt(11*n)) : n in [0..80]];
    
  • Mathematica
    Table[Floor[Sqrt[11n]],{n,0,80}]
  • PARI
    a(n)=sqrtint(11*n) \\ Charles R Greathouse IV, Jan 17 2012

Formula

a(n) = A000196(11*n).

A202308 a(n) = floor(sqrt(13*n)).

Original entry on oeis.org

0, 3, 5, 6, 7, 8, 8, 9, 10, 10, 11, 11, 12, 13, 13, 13, 14, 14, 15, 15, 16, 16, 16, 17, 17, 18, 18, 18, 19, 19, 19, 20, 20, 20, 21, 21, 21, 21, 22, 22, 22, 23, 23, 23, 23, 24, 24, 24, 24, 25, 25, 25, 26, 26, 26, 26, 26, 27, 27, 27, 27, 28, 28, 28, 28, 29, 29
Offset: 0

Views

Author

Vincenzo Librandi, Jan 17 2012

Keywords

Crossrefs

Programs

  • Magma
    [Floor(Sqrt(13*n)) : n in [0..80]];
    
  • Mathematica
    Table[Floor[Sqrt[13n]],{n,0,80}]
  • PARI
    sqrtint(13*n) \\ Charles R Greathouse IV, Jan 17 2012

Formula

a(n) = A000196(13*n).

A275868 Numbers n tracing out a spiral path in a pentagonal Z module thereby creating a ten-fold twin pattern with relations to quasicrystals.

Original entry on oeis.org

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

Views

Author

Wolfgang Hornfeck, May 19 2017

Keywords

Comments

Interpreted as consecutive steps along directions according to a basis of vectors represented by the tenth roots of unity in the complex number plane, the sequence traces out the path of a single spiral of a ten-fold twin pattern. All points are located on a pentagonal Z module (following the ideas of Quiquandon et al.). The ten-fold twin pattern is unique in that the local structure across the twin boundaries is identically coherent to the local structure within the twin domains. The ten-fold twin pattern is enantiomorphous, depending on the sign of the irrational shift of 1/(4*tau), with tau = (1+sqrt(5))/2 the Golden Ratio, along a [110] direction of the twin domain's orthorhombic unit cell. The sequence expresses the fact that the ten-fold twin pattern has no adjustable parameters, except for an arbitrary general scaling factor.

Crossrefs

Programs

  • Mathematica
    Table[Mod[Floor[Sqrt[2*(i-1)]]+If[MemberQ[Table[2*j+Ceiling[2*Sqrt[j]],{j,1,i}],i],1,0],10],{i,1,100}]

Formula

a(n) = floor(sqrt( 2*(n-1) )) + [n in { 2*k + ceiling(2*sqrt(k)) | k in N}] mod 10. Note, that floor(sqrt( 2*n )) is A172471 (here corrected for its offset in the combined formula), while 2*k + ceiling(2*sqrt(k)) is A078633. [] denotes the Iverson bracket.
Showing 1-10 of 11 results. Next