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

A064801 Take 1, skip 2, take 2, skip 3, take 3, etc.

Original entry on oeis.org

1, 4, 5, 9, 10, 11, 16, 17, 18, 19, 25, 26, 27, 28, 29, 36, 37, 38, 39, 40, 41, 49, 50, 51, 52, 53, 54, 55, 64, 65, 66, 67, 68, 69, 70, 71, 81, 82, 83, 84, 85, 86, 87, 88, 89, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 121, 122, 123, 124, 125, 126, 127, 128
Offset: 1

Views

Author

Robert G. Wilson v, Oct 21 2001

Keywords

Comments

A253607(a(n)) < 0. - Reinhard Zumkeller, Jan 05 2015
Integers m such that A000196(m) = A079643(m). - Firas Melaih, Dec 10 2020
Also possible values of floor(x*floor(x)) for real x >= 1. - Jianing Song, Feb 16 2021

Crossrefs

Cf. A061885 (complement), A253607.
Cf. A136272.

Programs

  • Haskell
    a064801 n = a064801_list !! (n-1)
    a064801_list = f 1 [1..] where
       f k xs = us ++ f (k + 1) (drop (k + 1) vs)
                where (us, vs) = splitAt k xs
    -- Reinhard Zumkeller, May 16 2014
    
  • Maple
    seq(`if`(floor(sqrt(k)) * (floor(sqrt(k)) + 1) > k, k, NULL), k = 0..2034); # a(1)..a(1000), Rainer Rosenthal, Jul 19 2024
  • Mathematica
    a = Table[n, {n, 0, 200} ]; b = {}; Do[a = Drop[a, {1, n} ]; b = Append[b, Take[a, {1, n} ]]; a = Drop[a, {1, n} ], {n, 1, 14} ]; Flatten[b]
    Flatten[Table[Range[n^2,n^2+n-1],{n,12}]] (* Harvey P. Dale, Dec 18 2015 *)
  • PARI
    { n=0; for (m=1, 10^9, s=m^2; a=0; for (k=0, m - 1, a=s+k; write("b064801.txt", n++, " ", a); if (n==1000, return)) ) } \\ Harry J. Smith, Sep 26 2009
    
  • Python
    from math import isqrt  # after Rainer Rosenthal
    def isA(k: int): return k < ((s:=isqrt(k)) * (s + 1))
    print([k for k in range(129) if isA(k)]) # Peter Luschny, Jul 19 2024

Formula

a(n) = A004202(n) - 1.
Can be interpreted as a table read by rows: T(n,k) = n^2 + k, 0 <= k < n. T(n,k) = 0 iff k > A000196(n); T(n,0) = A000290(n); T(n,1) = A002522(n) for n > 1; T(n,2) = A010000(n) = A059100(n) for n > 2; T(n, n-3) = A014209(n-1) for n > 2; T(n, n-2) = A028552(n) for n > 1; T(n, n-1) = A028387(n-1); T(2*n+1, n) = A001107(n+1). - Reinhard Zumkeller, Nov 18 2003
Numbers k such that floor(sqrt(k)) * (floor(sqrt(k)) + 1) > k. - Rainer Rosenthal, Jul 19 2024

A255315 Lower triangular matrix describing the shape of a half hyperbola in the Dirichlet divisor problem.

Original entry on oeis.org

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

Views

Author

Mats Granvik, May 31 2015

Keywords

Comments

The sum of terms of row n is n. Length of row n is n.
From Mats Granvik, Feb 21 2016: (Start)
A006218(n) = (n^2 - ((2*Sum_{kk=1..n} Sum_{k=1..kk} T(n,k)) - n)) + 2*n - round(1 + (1/2)*(-3 + sqrt(n) + sqrt(1 + n))).
A006218(n) = -((n^2 - ((2*Sum_{kk=1..n} Sum_{k=1..kk} T(n,n-k+1)) - n)) - 2*n + round(1 + (1/2)*(-3 + sqrt(n) + sqrt(1 + n)))).
(End)
From Mats Granvik, May 28 2017: (Start)
A006218(n) = (n^2 - (2*(Sum_{k=1..n} T(n, k)*(n - k + 1)) - n)) + 2*n - round(1 + (1/2)*(-3 + sqrt(n) + sqrt(1 + n))).
A006218(n) = -((n^2 - (2*(Sum_{k=1..n} T(n, n - k + 1)*(n - k + 1)) - n)) - 2*n + round(1 + (1/2)*(-3 + sqrt(n) + sqrt(1 + n)))).
(End)
From Mats Granvik, Sep 07 2017: (Start)
It appears that:
The number of 0's in row n is equal to the number of 2's in row n and their number is given by A000196(n) - 1.
The number of 1's in column k is given by A152948(k+2).
The number of 2's in column k is given by A000096(k-1).
The row index of the last nonzero entry in column k is given by A005563(k).
(End)
From Mats Granvik, Oct 06 2018: (Start)
The smallest k such that T(n,k)=2 is given by A079643(n) = floor(n/floor(sqrt(n))).
This gives the lower bound: A006218(n) >= A094761(n) + A079643(n)*2*(A000196(n)-1).
<=> A006218(n) >= 2*n - (floor(sqrt(n)))^2 + floor(n/floor(sqrt(n)))*2*floor(sqrt(n)-1).
The average of k:s such that T(n,k)=2, for n>3 is given by:
b(n) = Sum_{k=1..n} (k*floor(abs(T(n, k)-1/2)))/floor(sqrt(n)-1).
This gives A006218(n) = 2*n - (floor(sqrt(n)))^2 + b(n)*2*floor(sqrt(n)-1) = 2*n - (floor(sqrt(n)))^2 + (Sum_{k=1..n} (k*floor(abs(T(n, k)-1/2))))*2, for n>3.
The largest k such that T(n,k)=2 is given by A004526(n) = floor(n/2).
This gives the upper bound: A006218(n) <= A094761(n) + A004526(n)*2*(A000196(n)-1).
<=> A006218(n) <= 2*n - (floor(sqrt(n)))^2 + floor(n/2)*2*floor(sqrt(n)-1).
The lower bound starts: 1, 3, 5, 8, 10, 14, 16, 20, 21, 23, ...
Sequence A006218 starts: 1, 3, 5, 8, 10, 14, 16, 20, 23, 27, ...
The upper bound starts: 1, 3, 5, 8, 10, 14, 16, 20, 25, 31, ...
(End)

Examples

			1;
1, 1;
1, 1, 1;
0, 2, 1, 1;
0, 2, 1, 1, 1;
0, 1, 2, 1, 1, 1;
0, 1, 2, 1, 1, 1, 1;
0, 1, 1, 2, 1, 1, 1, 1;
0, 0, 2, 2, 1, 1, 1, 1, 1;
0, 0, 2, 1, 2, 1, 1, 1, 1, 1;
0, 0, 2, 1, 2, 1, 1, 1, 1, 1, 1;
0, 0, 1, 2, 1, 2, 1, 1, 1, 1, 1, 1;
		

Crossrefs

Programs

  • Mathematica
    (* From Mats Granvik, Feb 21 2016: (Start) *)
    nn = 12;
    T = Table[
       Sum[Table[
         If[And[If[n*k <= r, If[n >= k, 1, 0], 0] == 1,
           If[(n + 1)*(k + 1) <= r, If[n >= k, 1, 0], 0] == 0], 1, 0], {n,
           1, r}], {k, 1, r}], {r, 1, nn}];
    Flatten[T]
    A006218a = Table[(n^2 - (2*Sum[Sum[T[[n, k]], {k, 1, kk}], {kk, 1, n}] -
            n)) + 2*n - Round[1 + (1/2)*(-3 + Sqrt[n] + Sqrt[1 + n])], {n,
         1, nn}];
    A006218b = -Table[(n^2 - (2*
              Sum[Sum[T[[n, n - k + 1]], {k, 1, kk}], {kk, 1, n}] - n)) -
         2*n + Round[1 + (1/2)*(-3 + Sqrt[n] + Sqrt[1 + n])], {n, 1, nn}];
    (A006218b - A006218a);
    (* (End) *)
    (* From Mats Granvik, May 28 2017: (Start) *)
    nn = 12;
    T = Table[
       Sum[Table[
         If[And[If[n*k <= r, If[n >= k, 1, 0], 0] == 1,
           If[(n + 1)*(k + 1) <= r, If[n >= k, 1, 0], 0] == 0], 1, 0], {n,
           1, r}], {k, 1, r}], {r, 1, nn}];
    Flatten[T]
    A006218a = Table[(n^2 - (2*Sum[T[[n, k]]*(n - k + 1), {k, 1, n}] - n)) +
        2*n - Round[1 + (1/2)*(-3 + Sqrt[n] + Sqrt[1 + n])], {n, 1, nn}];
    A006218b = Table[-((n^2 - (2*Sum[T[[n, n - k + 1]]*(n - k + 1), {k, 1, n}] -
              n)) - 2*n +
          Round[1 + (1/2)*(-3 + Sqrt[n] + Sqrt[1 + n])]), {n, 1, nn}];
    (A006218b - A006218a);
    (* (End) *)

Formula

See Mathematica program.
Showing 1-2 of 2 results.