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 2207 results. Next

A289780 p-INVERT of the positive integers (A000027), where p(S) = 1 - S - S^2.

Original entry on oeis.org

1, 4, 14, 47, 156, 517, 1714, 5684, 18851, 62520, 207349, 687676, 2280686, 7563923, 25085844, 83197513, 275925586, 915110636, 3034975799, 10065534960, 33382471801, 110713382644, 367182309614, 1217764693607, 4038731742156, 13394504020957, 44423039068114
Offset: 0

Views

Author

Clark Kimberling, Aug 10 2017

Keywords

Comments

Suppose s = (c(0), c(1), c(2), ...) is a sequence and p(S) is a polynomial. Let S(x) = c(0)*x + c(1)*x^2 + c(2)*x^3 + ... and T(x) = (-p(0) + 1/p(S(x)))/x. The p-INVERT of s is the sequence t(s) of coefficients in the Maclaurin series for T(x).
Taking p(S) = 1 - S gives the INVERT transform of s, so that p-INVERT is a generalization of the INVERT transform (e.g., A033453).
Guide to p-INVERT sequences using p(S) = 1 - S - S^2:
t(A000012) = t(1,1,1,1,1,1,1,...) = A001906
t(A000290) = t(1,4,9,16,25,36,...) = A289779
t(A000027) = t(1,2,3,4,5,6,7,8,...) = A289780
t(A000045) = t(1,2,3,5,8,13,21,...) = A289781
t(A000032) = t(2,1,3,4,7,11,14,...) = A289782
t(A000244) = t(1,3,9,27,81,243,...) = A289783
t(A000302) = t(1,4,16,64,256,...) = A289784
t(A000351) = t(1,5,25,125,625,...) = A289785
t(A005408) = t(1,3,5,7,9,11,13,...) = A289786
t(A005843) = t(2,4,6,8,10,12,14,...) = A289787
t(A016777) = t(1,4,7,10,13,16,...) = A289789
t(A016789) = t(2,5,8,11,14,17,...) = A289790
t(A008585) = t(3,6,9,12,15,18,...) = A289795
t(A000217) = t(1,3,6,10,15,21,...) = A289797
t(A000225) = t(1,3,7,15,31,63,...) = A289798
t(A000578) = t(1,8,27,64,625,...) = A289799
t(A000984) = t(1,2,6,20,70,252,...) = A289800
t(A000292) = t(1,4,10,20,35,56,...) = A289801
t(A002620) = t(1,2,4,6,9,12,16,...) = A289802
t(A001906) = t(1,3,8,21,55,144,...) = A289803
t(A001519) = t(1,1,2,5,13,34,...) = A289804
t(A103889) = t(2,1,4,3,6,5,8,7,,...) = A289805
t(A008619) = t(1,1,2,2,3,3,4,4,...) = A289806
t(A080513) = t(1,2,2,3,3,4,4,5,...) = A289807
t(A133622) = t(1,2,1,3,1,4,1,5,...) = A289809
t(A000108) = t(1,1,2,5,14,42,...) = A081696
t(A081696) = t(1,1,3,9,29,97,...) = A289810
t(A027656) = t(1,0,2,0,3,0,4,0,5...) = A289843
t(A175676) = t(1,0,0,2,0,0,3,0,...) = A289844
t(A079977) = t(1,0,1,0,2,0,3,...) = A289845
t(A059841) = t(1,0,1,0,1,0,1,...) = A289846
t(A000040) = t(2,3,5,7,11,13,...) = A289847
t(A008578) = t(1,2,3,5,7,11,13,...) = A289828
t(A000142) = t(1!, 2!, 3!, 4!, ...) = A289924
t(A000201) = t(1,3,4,6,8,9,11,...) = A289925
t(A001950) = t(2,5,7,10,13,15,...) = A289926
t(A014217) = t(1,2,4,6,11,17,29,...) = A289927
t(A000045*) = t(0,1,1,2,3,5,...) = A289975 (* indicates prepended 0's)
t(A000045*) = t(0,0,1,1,2,3,5,...) = A289976
t(A000045*) = t(0,0,0,1,1,2,3,5,...) = A289977
t(A290990*) = t(0,1,2,3,4,5,...) = A290990
t(A290990*) = t(0,0,1,2,3,4,5,...) = A290991
t(A290990*) = t(0,0,01,2,3,4,5,...) = A290992

Examples

			Example 1:  s = (1,2,3,4,5,6,...) = A000027 and p(S) = 1 - S.
S(x) = x + 2x^2 + 3x^3 + 4x^4 + ...
p(S(x)) = 1 - (x + 2x^2 + 3x^3 + 4x^4 + ... )
- p(0) + 1/p(S(x)) = -1 + 1 + x + 3x^2 + 8x^3 + 21x^4 + ...
T(x) = 1 + 3x + 8x^2 + 21x^3 + ...
t(s) = (1,3,8,21,...) = A001906.
***
Example 2:  s = (1,2,3,4,5,6,...) = A000027 and p(S) = 1 - S - S^2.
S(x) =  x + 2x^2 + 3x^3 + 4x^4 + ...
p(S(x)) = 1 - ( x + 2x^2 + 3x^3 + 4x^4 + ...) - ( x + 2x^2 + 3x^3 + 4x^4 + ...)^2
- p(0) + 1/p(S(x)) = -1 + 1 + x + 4x^2 + 14x^3 + 47x^4 + ...
T(x) = 1 + 4x + 14x^2 + 47x^3 + ...
t(s) = (1,4,14,47,...) = A289780.
		

Crossrefs

Cf. A000027.

Programs

  • GAP
    P:=[1,4,14,47];; for n in [5..10^2] do P[n]:=5*P[n-1]-7*P[n-2]+5*P[n-3]-P[n-4]; od; P; # Muniru A Asiru, Sep 03 2017
  • Mathematica
    z = 60; s = x/(1 - x)^2; p = 1 - s - s^2;
    Drop[CoefficientList[Series[s, {x, 0, z}], x], 1] (* A000027 *)
    Drop[CoefficientList[Series[1/p, {x, 0, z}], x], 1] (* A289780 *)
  • PARI
    x='x+O('x^99); Vec((1-x+x^2)/(1-5*x+7*x^2-5*x^3+x^4)) \\ Altug Alkan, Aug 13 2017
    

Formula

G.f.: (1 - x + x^2)/(1 - 5 x + 7 x^2 - 5 x^3 + x^4).
a(n) = 5*a(n-1) - 7*a(n-2) + 5*a(n-3) - a(n-4).

A144112 Weight array W={w(i,j)} of the natural number array A000027.

Original entry on oeis.org

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

Views

Author

Clark Kimberling, Sep 11 2008

Keywords

Comments

The lattice lines in the first quadrant (including the x and y axes) cut the plane into unit squares. Suppose a weight w(i,j) is assigned to the square that has as upper right corner the point (i,j). Let s(m,n) be the sum of the weights w(i,j) for 1<=i<=m, 1<=j<=n. We call the array W={w(i,j)} the weight array of the array S={s(m,n)} and S the accumulation array of W. For the case at hand, S is the array of natural numbers having the following antidiagonals: (1), then (2,3), then (4,5,6), then (7,8,9,10) and so on.
Contribution from Clark Kimberling, Sep 14 2008: (Start)
In general, the weight array W of an arbitrary rectangular array S={s(i,j): i>=1, j>=1} is defined in two steps:
(1) extend s by defining s(i,j)=0 if i=0 or j=0;
(2) then w(m,n)=s(m,n)+s(m-1,n-1)-s(m,n-1)-s(m-1,n) for m>=1, n>=1. (End)

Examples

			From _Clark Kimberling_, Jan 31 2011: (Start)
Northwest corner:
  1 1 2 3 4 5
  2 1 1 1 1 1
  3 1 1 1 1 1
  4 1 1 1 1 1
  5 1 1 1 1 1.
so that the accumulation array has corner:
  1...2...4...7...11...16
  3...5...8...12..17...23
  6...9...13..18..24...31
  10..14..19..25..32...40
  15..20..26..33..41...50.
s(2,4)=1+1+2+3+2+1+1+1=12. (End)
		

Crossrefs

Programs

  • Mathematica
    Array[Append[PadRight[{#},#,1],#+1]&,15,0] (* Paolo Xausa, Dec 21 2023 *)

Formula

Row 1: 1 followed by A000027.
Row n: n followed by A000012, for n>1.
G.f.: x*y*(1 - (1 + x)*y + (1 - x + x^2)*y^2)/((1 - x)^2*(1 - y)^2). - Stefano Spezia, Oct 01 2023

A336811 Irregular triangle read by rows T(n,k) in which the length of row n equals the partition number A000041(n-1) and every column k gives the positive integers A000027, with n >= 1 and k >= 1.

Original entry on oeis.org

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

Views

Author

Omar E. Pol, Nov 20 2020

Keywords

Comments

In other words: row n lists A028310(n-1) blocks where the m-th block consists of A187219(m) copies of n - m + [m=1], with n >= 1 and m >= 1, where [] is the Iverson bracket. [Corrected by Paolo Xausa, Feb 10 2023]
All divisors of all terms in row n are also all parts in the last section of the set of partitions of n.
Thus all divisors of all terms of the first n rows of triangle are also all parts of all partitions of n. In other words: all divisors of the first A000070(n-1) terms of the sequence are also all parts of all partitions of n. - Omar E. Pol, Jun 19 2021
From Omar E. Pol, Jul 31 2021: (Start)
The number of k's in row n is equal to A002865(n-k), 1 <= k <= n.
The number of terms >= k in row n is equal to A000041(n-k), 1 <= k <= n.
The number of k's in the first n rows (or in the first A000070(n-1) terms of the sequence) is equal to A000041(n-k), 1 <= k <= n.
The number of terms >= k in the first n rows (or in the first A000070(n-1) terms of the sequence) is equal to A000070(n-k), 1 <= k <= n.
First n rows of triangle (or first A000070(n-1) terms of the sequence) in nonincreasing order give the n-th row of A176206. (End)

Examples

			Triangle begins:
1;
2;
3, 1;
4, 2, 1;
5, 3, 2, 1, 1;
6, 4, 3, 2, 2, 1, 1;
7, 5, 4, 3, 3, 2, 2, 1, 1, 1, 1;
8, 6, 5, 4, 4, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1;
9, 7, 6, 5, 5, 4, 4, 3, 3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1;
...
For n = 6, by definition the length of row 6 is A000041(6-1) = A000041(5) = 7, so the row 6 of triangle has seven terms. Since every column lists the positive integers A000027 so the row 6 is [6, 4, 3, 2, 2, 1, 1].
Then we have that the divisors of the numbers of the 6th row are:
.
6th row of the triangle ---------->   6 4 3 2 2 1 1
                                      3 2 1 1 1
                                      2 1
                                      1
.
There are seven 1's, four 2's, two 3's, one 4 and one 6.
In total there are 7 + 4 + 2 + 1 + 1 = 15 divisors.
On the other hand the last section of the set of the partitions of 6 can be represented in several ways, five of them as shown below:
._ _ _ _ _ _
|_ _ _      |       6    6                  6                       6
|_ _ _|_    |     3 3    3 3              3   3                     3   3
|_ _    |   |     4 2    4 2            4       2                     4     2
|_ _|_ _|_  |   2 2 2    2 2 2        2   2       2                 2 2   2
          | |       1      1                        1                           1
          | |       1        1                        1                       1
          | |       1        1                          1                   1
          | |       1          1                          1               1
          | |       1          1                            1           1
          | |       1            1                            1       1
          |_|       1              1                            1   1
.
   Figure 1.  Figure 2.  Figure 3.        Figure 4.                   Figure 5.
.
In every figure there are seven 1's, four 2's, two 3's, one 4 and one 6, as shown also the 6th row of A182703.
In total there are 7 + 4 + 2 + 1 + 1 = A138137(6) = 15 parts in every figure.
Figure 5 is an arrangement that shows the correspondence between divisors and parts since the columns give the divisors of the terms of 6th row of triangle.
Finally we can see that all divisors of all numbers in the 6th row of the triangle are the same positive integers as all parts in the last section of the set of the partitions of 6.
Example edited by _Omar E. Pol_, Aug 10 2021
		

Crossrefs

Row sums give A000070.
Row n has length A000041(n-1).
Every column k gives A000027.
Companion of A176206.

Programs

  • Mathematica
    A336811[row_]:=Flatten[Table[ConstantArray[row-m,PartitionsP[m]-PartitionsP[m-1]],{m,0,row-1}]];
    Array[A336811,10] (* Generates 10 rows *) (* Paolo Xausa, Feb 10 2023 *)
  • PARI
    f(n) = numbpart(n-1);
    T(n, k) = {if (k > f(n), error("invalid k")); if (k==1, return (n)); my(s=0); while (k <= f(n-1), s++; n--;); 1+s;}
    tabf(nn) = {for (n=1, nn, for (k=1, f(n), print1(T(n,k), ", ");); print;);} \\ Michel Marcus, Jan 13 2021

A038722 Take the sequence of natural numbers (A000027) and reverse successive subsequences of lengths 1,2,3,4,... .

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, May 02 2000

Keywords

Comments

Ramanujan theta functions: f(q) (see A121373), phi(q) (A000122), psi(q) (A010054), chi(q) (A000700).
The rectangular array having A038722 as antidiagonals is the transpose of the rectangular array given by A000217. Column 1 of array A038722 is A000124 (central polygonal numbers). Array A038722 is the dispersion of the complement of A000124. - Clark Kimberling, Apr 05 2003
a(n) is the smallest number not yet in the sequence such that n + a(n) is one more than a square. - Franklin T. Adams-Watters, Apr 06 2009
From Hieronymus Fischer, Apr 30 2012: (Start)
A reordering of the natural numbers.
The sequence is self-inverse in that a(a(n)) = n.
Also: a(1) = 1, a(n) = m (where m is the least triangular number > a(k) for 1 <= k < n), if the minimal natural number not yet in the sequence is greater than a(n-1), otherwise a(n) = a(n-1)-1. (End)

Examples

			The rectangular array view is
   1    2    4    7   11   16   22   29   37   46
   3    5    8   12   17   23   30   38   47   57
   6    9   13   18   24   31   39   48   58   69
  10   14   19   25   32   40   49   59   70   82
  15   20   26   33   41   50   60   71   83   96
  21   27   34   42   51   61   72   84   97  111
  28   35   43   52   62   73   85   98  112  127
  36   44   53   63   74   86   99  113  128  144
  45   54   64   75   87  100  114  129  145  162
  55   65   76   88  101  115  130  146  163  181
		

References

  • Suggested by correspondence with Michael Somos.
  • R. Honsberger, "Ingenuity in Mathematics", Table 10.4 on page 87.

Crossrefs

A self-inverse permutation of the natural numbers.
Cf. A056011 (boustrophedon).
Cf. A061579.

Programs

  • Haskell
    a038722 n = a038722_list !! (n-1)
    a038722_list = concat a038722_tabl
    a038722_tabl = map reverse a000027_tabl
    a038722_row n = a038722_tabl !! (n-1)
    -- Reinhard Zumkeller, Nov 08 2013
  • Mathematica
    (* Program generates dispersion array T of the increasing sequence f[n] *)
    r=40; r1=12; c=40; c1=12; f[n_] := Floor[n+1/2+Sqrt[2n]]
      (* complement of column 1 *)
    mex[list_] := NestWhile[#1 + 1 &, 1, Union[list][[#1]] <= #1 &, 1, Length[Union[list]]]
    rows = {NestList[f, 1, c]};
    Do[rows = Append[rows, NestList[f, mex[Flatten[rows]], r]], {r}];
    t[i_, j_] := rows[[i, j]];
    TableForm[Table[t[i, j], {i, 1, r1}, {j, 1, c1}]]
    (* A038722 array *)
    Flatten[Table[t[k, n - k + 1], {n, 1, c1}, {k, 1, n}]] (* A038722 sequence *)
     (* Clark Kimberling, Jun 06 2011, corrected Jan 26 2025 *)
    Table[ n, {m, 12}, {n, m (m + 1)/2, m (m - 1)/2 + 1, -1}] // Flatten (* or *)
    Table[ Ceiling[(Sqrt[8 n + 1] - 1)/2]^2 - n + 1, {n, 78}] (* Robert G. Wilson v, Jun 27 2014 *)
    With[{nn=20},Reverse/@TakeList[Range[(nn(1+nn))/2],Range[nn]]//Flatten] (* Requires Mathematica version 11 or later *) (* Harvey P. Dale, Dec 14 2017 *)
  • PARI
    a(n)=local(t=floor(1/2+sqrt(2*n))); if(n<1, 0, t^2-n+1) /* Paul D. Hanna */
    

Formula

a(n) = (sqrt(2n-1) - 1/2)*(sqrt(2n-1) + 3/2) - n + 2 = A061579(n-1) + 1. Seen as a square table by antidiagonals, T(n, k) = k + (n+k-1)*(n+k-2)/2, i.e., the transpose of A000027 as a square table.
G.f.: g(x) = (x/(1-x))*(psi(x) - x/(1-x) + 2*Sum_{k>=0} k*x^(k*(k+1)/2)) where psi(x) = Sum_{k>=0} x^(k*(k+1)/2) = (1/2)*x^(-1/8)*theta_2(0,x^(1/2)) is a Ramanujan theta function. - Hieronymus Fischer, Aug 08 2007
a(n) = floor(sqrt(2*n) + 1/2)^2 - n + 1. - Clark Kimberling, Jun 05 2011; corrected by Paul D. Hanna, Jun 27 2011
From Hieronymus Fischer, Apr 30 2012: (Start)
a(n) = a(n-1)-1, if a(n-1)-1 > 0 is not in the set {a(k)| 1<=k
a(n) = n for n = 2k(k+1)+1, k >= 0.
a(n+1) = (m+2)(m+3)/2, if 8a(n)-7 is a square of an odd number, otherwise a(n+1) = a(n)-1, where m = (sqrt(8a(n)-7)-1)/2.
a(n) = ceiling((sqrt(8n+1)-1)/2)^2 - n + 1. (End)
G.f. as rectangular array: x*y*(1 - (1 + x)*y + (1 - x + x^2)*y^2)/((1 - x)^3*(1 - y)^3). - Stefano Spezia, Dec 25 2022

A136119 Limiting sequence when we start with the positive integers (A000027) and delete in step n >= 1 the term at position n + a(n).

Original entry on oeis.org

1, 3, 4, 5, 7, 8, 10, 11, 13, 14, 15, 17, 18, 20, 21, 22, 24, 25, 27, 28, 29, 31, 32, 34, 35, 37, 38, 39, 41, 42, 44, 45, 46, 48, 49, 51, 52, 54, 55, 56, 58, 59, 61, 62, 63, 65, 66, 68, 69, 71, 72, 73, 75, 76, 78, 79, 80, 82, 83, 85, 86, 87, 89, 90, 92, 93, 95, 96, 97, 99, 100
Offset: 1

Author

Ctibor O. Zizka, Mar 16 2008

Keywords

Comments

Apparently a(n) = A001953(n-1)+1 = floor((n-1/2)*sqrt(2))+1 (confirmed for n < 20000) and a(n+1) - a(n) = A001030(n). From the definitions these conjectures are by no means obvious. Can they be proved? - Klaus Brockhaus, Apr 15 2008 [For an affirmative answer, see the Cloitre link.]
This is the s(n)-Wythoff sequence for s(n)=2n-1; see A184117 for the definition. Complement of A184119. - Clark Kimberling, Jan 09 2011

Examples

			First few steps are:
1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,...
n = 1; delete term at position 1+a(1) = 2: 2;
1,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,...
n = 2; delete term at position 2+a(2) = 5: 6;
1,3,4,5,7,8,9,10,11,12,13,14,15,16,17,18,19,20,...
n = 3; delete term at position 3+a(3) = 7: 9;
1,3,4,5,7,8,10,11,12,13,14,15,16,17,18,19,20,...
n = 4; delete term at position 4+a(4) = 9: 12;
1,3,4,5,7,8,10,11,13,14,15,16,17,18,19,20,...
n = 5; delete term at position 5+a(5) = 12: 16;
1,3,4,5,7,8,10,11,13,14,15,17,18,19,20,...
n = 6; delete term at position 6+a(6) = 14: 19;
1,3,4,5,7,8,10,11,13,14,15,17,18,20,...
		

References

  • B. Cloitre, The golden sieve, preprint 2008

Crossrefs

Cf. A000027, A001953 (floor((n+1/2)*sqrt(2))), A001030 (fixed under 1 -> 21, 2 -> 211), A136110, A137292.
Cf. A242535.
Cf. A000217 (T).

Programs

  • Haskell
    import Data.List (delete)
    a136119 n = a136119_list !! (n-1)
    a136119_list = f [1..] where
       f zs@(y:xs) = y : f (delete (zs !! y) xs)
    -- Reinhard Zumkeller, May 17 2014
    
  • Magma
    [Ceiling((n-1/2)*Sqrt(2)): n in [1..100]]; // Vincenzo Librandi, Jul 01 2019
    
  • Mathematica
    f[0] = Range[100]; f[n_] := f[n] = Module[{pos = n + f[n-1][[n]]}, If[pos > Length[f[n-1]], f[n-1], Delete[f[n-1], pos]]]; f[1]; f[n = 2]; While[f[n] != f[n-1], n++]; f[n] (* Jean-François Alcover, May 08 2019 *)
    T[n_] := n (n + 1)/2; Table[1 + 2 Sqrt[T[n-1]] , {n, 1, 71}] // Floor (* Ralf Steiner, Oct 23 2019 *)
  • PARI
    apply( {A136119(n)=sqrtint(n*(n-1)*2)+1}, [1..99]) \\ M. F. Hasler, Jul 04 2022

Formula

a(n) = ceiling((n-1/2)*sqrt(2)). This can be proved in the same way as the formula given for A099267. There are some generalizations. For instance, it is possible to consider "a(n)+K*n" instead of "a(n)+n" for deleting terms where K=0,1,2,... is fixed. The constant involved in the Beatty sequence for the sequence of deleted terms then depends on K and equals (K + 1 + sqrt((K+1)^2 + 4))/2. K=0 is related to A099267. 1+A001954 is the complement sequence of this sequence A136119. - Benoit Cloitre, Apr 18 2008
a(n) = floor(1 + 2*sqrt(T(n-1))), with triangular numbers T(). - Ralf Steiner, Oct 23 2019
Lim_{n->inf}(a(n)/(n - 1)) = sqrt(2), with {a(n)/(n - 1)} decreasing. - Ralf Steiner, Oct 24 2019

Extensions

Edited and extended by Klaus Brockhaus, Apr 15 2008
An incorrect g.f. removed by Alois P. Heinz, Dec 14 2012

A286161 Compound filter: a(n) = T(A001511(n), A046523(n)), where T(n,k) is sequence A000027 used as a pairing function.

Original entry on oeis.org

1, 5, 2, 18, 2, 23, 2, 59, 7, 23, 2, 94, 2, 23, 16, 195, 2, 80, 2, 94, 16, 23, 2, 355, 7, 23, 29, 94, 2, 467, 2, 672, 16, 23, 16, 706, 2, 23, 16, 355, 2, 467, 2, 94, 67, 23, 2, 1331, 7, 80, 16, 94, 2, 302, 16, 355, 16, 23, 2, 1894, 2, 23, 67, 2422, 16, 467, 2, 94, 16, 467, 2, 2779, 2, 23, 67, 94, 16, 467, 2, 1331, 121, 23, 2, 1894, 16, 23, 16, 355, 2, 1832
Offset: 1

Author

Antti Karttunen, May 04 2017

Keywords

Programs

  • PARI
    A001511(n) = (1+valuation(n,2));
    A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); };  \\ This function from Charles R Greathouse IV, Aug 17 2011
    A286161(n) = (2 + ((A001511(n)+A046523(n))^2) - A001511(n) - 3*A046523(n))/2;
    for(n=1, 10000, write("b286161.txt", n, " ", A286161(n)));
    
  • Python
    from sympy import factorint
    def T(n, m): return ((n + m)**2 - n - 3*m + 2)/2
    def P(n):
        f = factorint(n)
        return sorted([f[i] for i in f])
    def a046523(n):
        x=1
        while True:
            if P(n) == P(x): return x
            else: x+=1
    def a001511(n): return 2 + bin(n - 1)[2:].count("1") - bin(n)[2:].count("1")
    def a(n): return T(a001511(n), a046523(n)) # Indranil Ghosh, May 06 2017
  • Scheme
    (define (A286161 n) (* (/ 1 2) (+ (expt (+ (A001511 n) (A046523 n)) 2) (- (A001511 n)) (- (* 3 (A046523 n))) 2)))
    

Formula

a(n) = (1/2)*(2 + ((A001511(n)+A046523(n))^2) - A001511(n) - 3*A046523(n)).

A291750 Compound filter: a(n) = P(A003557(n), A048250(n)), where P(n,k) is sequence A000027 used as a pairing function.

Original entry on oeis.org

1, 4, 7, 8, 16, 67, 29, 19, 18, 154, 67, 80, 92, 277, 277, 53, 154, 94, 191, 173, 497, 631, 277, 109, 50, 862, 75, 302, 436, 2557, 497, 169, 1129, 1432, 1129, 142, 704, 1771, 1541, 214, 862, 4561, 947, 668, 328, 2557, 1129, 179, 98, 236, 2557, 905, 1432, 199, 2557, 355, 3161, 4006, 1771, 2630, 1892, 4561, 564, 593, 3487, 10297, 2279, 1487, 4561, 10297, 2557
Offset: 1

Author

Antti Karttunen, Sep 04 2017

Keywords

Comments

A000203 (sigma(n)) is a function of this sequence, because formula
A000203(n) = A092261(n) * A295294(n)
can be rewritten as a relation:
where A057521(n) = A064549(A003557(n)), thus A000203(n) is a function of A003557(n) and A048250(n), the values that are packed here into a(n).
A001615 (Dedekind's psi) is a function of this sequence, because it can be written as A001615(n) = A003557(n)*A048250(n).

Crossrefs

Cf. A000027, A000203, A001615, A003557, A048250, A291751 (rgs-version of this filter).

Programs

Formula

a(n) = (1/2)*(2 + ((A003557(n) + A048250(n))^2) - A003557(n) - 3*A048250(n)).

A185787 Sum of first k numbers in column k of the natural number array A000027; by antidiagonals.

Original entry on oeis.org

1, 7, 25, 62, 125, 221, 357, 540, 777, 1075, 1441, 1882, 2405, 3017, 3725, 4536, 5457, 6495, 7657, 8950, 10381, 11957, 13685, 15572, 17625, 19851, 22257, 24850, 27637, 30625, 33821, 37232, 40865, 44727, 48825, 53166, 57757, 62605, 67717, 73100, 78761, 84707, 90945, 97482, 104325, 111481, 118957, 126760, 134897, 143375
Offset: 1

Author

Clark Kimberling, Feb 03 2011

Keywords

Comments

This is one of many interesting sequences and arrays that stem from the natural number array A000027, of which a northwest corner is as follows:
1....2.....4.....7...11...16...22...29...
3....5.....8....12...17...23...30...38...
6....9....13....18...24...31...39...48...
10...14...19....25...32...40...49...59...
15...20...26....33...41...50...60...71...
21...27...34....42...51...61...72...84...
28...35...43....52...62...73...85...98...
Blocking out all terms below the main diagonal leaves columns whose sums comprise A185787. Deleting the main diagonal and then summing give A185787. Analogous treatments to the left of the main diagonal give A100182 and A101165. Further sequences obtained directly from this array are easily obtained using the following formula for the array: T(n,k)=n+(n+k-2)(n+k-1)/2.
Examples:
row 1: A000124
row 2: A022856
row 3: A016028
row 4: A145018
row 5: A077169
col 1: A000217
col 2: A000096
col 3: A034856
col 4: A055998
col 5: A046691
col 6: A052905
col 7: A055999
diag. (1,5,...) ...... A001844
diag. (2,8,...) ...... A001105
diag. (4,12,...)...... A046092
diag. (7,17,...)...... A056220
diag. (11,23,...) .... A132209
diag. (16,30,...) .... A054000
diag. (22,38,...) .... A090288
diag. (3,9,...) ...... A058331
diag. (6,14,...) ..... A051890
diag. (10,20,...) .... A005893
diag. (15,27,...) .... A097080
diag. (21,35,...) .... A093328
antidiagonal sums: (1,5,15,34,...)=A006003=partial sums of A002817.
Let S(n,k) denote the n-th partial sum of column k. Then
S(n,k)=n*(n^2+3k*n+3*k^2-6*k+5)/6.
S(n,1)=n(n+1)(n+2)/6
S(n,2)=n(n+1)(n+5)/6
S(n,3)=n(n+2)(n+7)/6
S(n,4)=n(n^2+12n+29)/6
S(n,5)=n(n+5)(n+10)/6
S(n,6)=n(n+7)(n+11)/6
S(n,7)=n(n+10)(n+11)/6
Weight array of T: A144112
Accumulation array of T: A185506
Second rectangular sum array of T: A185507
Third rectangular sum array of T: A185508
Fourth rectangular sum array of T: A185509

Crossrefs

Programs

  • Magma
    [n*(7*n^2-6*n+5)/6: n in [1..50]]; // Vincenzo Librandi, Jul 04 2012
  • Mathematica
    f[n_,k_]:=n+(n+k-2)(n+k-1)/2;
    s[k_]:=Sum[f[n,k],{n,1,k}];
    Factor[s[k]]
    Table[s[k],{k,1,70}]  (* A185787 *)
    CoefficientList[Series[(3*x^2+3*x+1)/(1-x)^4,{x,0,50}],x] (* Vincenzo Librandi, Jul 04 2012 *)

Formula

a(n)=n*(7*n^2-6*n+5)/6.
G.f.: x*(3*x^2+3*x+1)/(1-x)^4. - Vincenzo Librandi, Jul 04 2012

Extensions

Edited by Clark Kimberling, Feb 25 2023

A286160 Compound filter: a(n) = T(A000010(n), A046523(n)), where T(n,k) is sequence A000027 used as a pairing function.

Original entry on oeis.org

1, 2, 5, 12, 14, 23, 27, 59, 42, 40, 65, 109, 90, 61, 86, 261, 152, 142, 189, 179, 148, 115, 275, 473, 273, 148, 318, 265, 434, 674, 495, 1097, 320, 226, 430, 1093, 702, 271, 430, 757, 860, 832, 945, 485, 619, 373, 1127, 1969, 1032, 485, 698, 619, 1430, 838, 1030, 1105, 856, 556, 1769, 2791, 1890, 625, 1117, 4497, 1426, 1196, 2277, 935, 1220
Offset: 1

Author

Antti Karttunen, May 04 2017

Keywords

Crossrefs

Cf. for example A061468 (one of the sequences this matches with).

Programs

  • PARI
    A000010(n) = eulerphi(n);
    A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); };  \\ This function from Charles R Greathouse IV, Aug 17 2011
    A286160(n) = (2 + ((A000010(n)+A046523(n))^2) - A000010(n) - 3*A046523(n))/2;
    for(n=1, 10000, write("b286160.txt", n, " ", A286160(n)));
    
  • Python
    from sympy import factorint, totient
    def T(n, m): return ((n + m)**2 - n - 3*m + 2)/2
    def P(n):
        f = factorint(n)
        return sorted([f[i] for i in f])
    def a046523(n):
        x=1
        while True:
            if P(n) == P(x): return x
            else: x+=1
    def a(n): return T(totient(n), a046523(n)) # Indranil Ghosh, May 06 2017
  • Scheme
    (define (A286160 n) (* (/ 1 2) (+ (expt (+ (A000010 n) (A046523 n)) 2) (- (A000010 n)) (- (* 3 (A046523 n))) 2)))
    

Formula

a(n) = (1/2)*(2 + ((A000010(n)+A046523(n))^2) - A000010(n) - 3*A046523(n)).

A286162 Compound filter: a(n) = T(A001511(n), A278222(n)), where T(n,k) is sequence A000027 used as a pairing function.

Original entry on oeis.org

2, 5, 7, 9, 16, 12, 29, 14, 16, 23, 67, 18, 67, 38, 121, 20, 16, 23, 67, 31, 436, 80, 277, 25, 67, 80, 631, 48, 277, 138, 497, 27, 16, 23, 67, 31, 436, 80, 277, 40, 436, 467, 1771, 94, 1771, 302, 1129, 33, 67, 80, 631, 94, 1771, 668, 2557, 59, 277, 302, 2557, 156, 1129, 530, 2017, 35, 16, 23, 67, 31, 436, 80, 277, 40, 436, 467, 1771, 94, 1771, 302, 1129, 50
Offset: 1

Author

Antti Karttunen, May 04 2017

Keywords

Programs

  • PARI
    A001511(n) = (1+valuation(n,2));
    A005940(n) = { my(p=2, t=1); n--; until(!n\=2, if((n%2), (t*=p), p=nextprime(p+1))); t }; \\ Modified from code of M. F. Hasler
    A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); };  \\ This function from Charles R Greathouse IV, Aug 17 2011
    A278222(n) = A046523(A005940(1+n));
    A286162(n) = (2 + ((A001511(n)+A278222(n))^2) - A001511(n) - 3*A278222(n))/2;
    for(n=1, 10000, write("b286162.txt", n, " ", A286162(n)));
    
  • Python
    from sympy import prime, factorint
    import math
    def T(n, m): return ((n + m)**2 - n - 3*m + 2)/2
    def A(n): return n - 2**int(math.floor(math.log(n, 2)))
    def b(n): return n + 1 if n<2 else prime(1 + (len(bin(n)[2:]) - bin(n)[2:].count("1"))) * b(A(n))
    def a005940(n): return b(n - 1)
    def P(n):
        f = factorint(n)
        return sorted([f[i] for i in f])
    def a046523(n):
        x=1
        while True:
            if P(n) == P(x): return x
            else: x+=1
    def a278222(n): return a046523(a005940(n + 1))
    def a001511(n): return bin(n)[2:][::-1].index("1") + 1
    def a(n): return T(a001511(n), a278222(n)) # Indranil Ghosh, May 05 2017
  • Scheme
    (define (A286162 n) (* (/ 1 2) (+ (expt (+ (A001511 n) (A278222 n)) 2) (- (A001511 n)) (- (* 3 (A278222 n))) 2)))
    

Formula

a(n) = (1/2)*(2 + ((A001511(n)+A278222(n))^2) - A001511(n) - 3*A278222(n)).
Showing 1-10 of 2207 results. Next