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.

Previous Showing 81-90 of 142 results. Next

A138553 Table read by rows: T(n,k) is the number of divisors of k that are <= n.

Original entry on oeis.org

1, 1, 2, 1, 2, 2, 2, 1, 3, 1, 2, 2, 3, 1, 3, 1, 3, 2, 2, 1, 4, 1, 2, 2, 3, 2, 3, 1, 3, 2, 3, 1, 4, 1, 2, 3, 3, 1, 3, 1, 4, 2, 2, 1, 4, 2, 2, 2, 3, 1, 4, 1, 3, 2, 2, 2, 4, 1, 2, 2, 4, 1, 3, 1, 3, 3, 2, 1, 4, 1, 3, 2, 3, 1, 3, 2, 3, 2, 2, 1, 5, 1, 2, 2, 3, 2, 4, 1, 3, 2, 3, 1, 5, 1, 2, 3, 3, 1, 4, 1, 4, 2, 2, 1, 5
Offset: 1

Views

Author

Keywords

Comments

Suggested by a question from Eric Desbiaux.
The row lengths are the lengths before the pattern for n repeats.
Antidiagonal sums A070824. [From Eric Desbiaux, Dec 10 2009]

Examples

			The first few rows start:
1, [A000012]
1, 2, [A000034]
1, 2, 2, 2, 1, 3, [A083039]
1, 2, 2, 3, 1, 3, 1, 3, 2, 2, 1, 4, [A083040]
		

Crossrefs

Row lengths A003418, row sums A025529, frequencies in rows A096180.

Programs

  • PARI
    lista(nrows) = {for (n=1, nrows, for (k=1, lcm(vector(n, i, i)), print1(sumdiv(k, d, d <=n), ", ");); print(););} \\ Michel Marcus, Jun 19 2014

Formula

T(n,k) = sum_{i|k, i<=n} 1.

Extensions

Definition corrected by Franklin T. Adams-Watters, Jun 19 2014

A187093 a(0)=0, a(1)=a(2)=1; thereafter, a(n+1) = n^2 - a(n-1).

Original entry on oeis.org

0, 1, 1, 3, 8, 13, 17, 23, 32, 41, 49, 59, 72, 85, 97, 111, 128, 145, 161, 179, 200, 221, 241, 263, 288, 313, 337, 363, 392, 421, 449, 479, 512, 545, 577, 611, 648, 685, 721, 759, 800, 841, 881, 923, 968, 1013, 1057, 1103, 1152, 1201, 1249, 1299, 1352, 1405, 1457
Offset: 0

Views

Author

Benjamin Coinsin, Mar 04 2011

Keywords

Comments

The original definition was equivalent to: Let S(n) = sum_{i=0..n} a(i), then n^2+a(n)-S(n+1) = S(n-2). This in turn simplifies to the present definition.

Crossrefs

Programs

  • Maple
    A000034 := proc(n) op(1+(n mod 2),[1,2]) ; end proc:
    A187093 := proc(n) (n^2-1+(-1)^floor(n/2)*A000034(n))/2 ;end proc: # R. J. Mathar
  • Mathematica
    LinearRecurrence[{3, -4, 4, -3, 1}, {0, 1, 1, 3, 8}, 60] (* Jean-François Alcover, Mar 30 2020 *)
    Join[{0},RecurrenceTable[{a[1]==a[2]==1,a[n+1]==n^2-a[n-1]},a,{n,60}]] (* Harvey P. Dale, Jan 05 2023 *)
  • PARI
    a(n) = (n^2-1+(-1)^(n\2)*(1 + (n % 2)))/2; \\ Michel Marcus, Sep 11 2016
  • Python
    print(0, end=',')       # a(-1)=0
    prpr = prev = 1         # a(0)=a(1)=1
    for n in range(2, 77):
        print(prpr, end=',')
        curr = n*n - prpr   # a(n) = n^2 - a(n-2)
        prpr = prev
        prev = curr
    # from Alex Ratushnyak, Aug 05 2012
    

Formula

a(n) = (n^2 - 1 + (-1)^floor(n/2) * A000034(n))/2.
G.f.: x*(-1+2*x+x^3-4*x^2) / ( (x^2+1)*(x-1)^3 ).
a(2^(n+1)) = A081654(n). - Anton Zakharov, Sep 13 2016

Extensions

Edited by N. J. A. Sloane, Mar 09 2011
More terms from Alex Ratushnyak, Aug 05 2012

A217310 The number of meandering curves of order n, with only one extremity covered by its arcs.

Original entry on oeis.org

0, 0, 4, 4, 32, 38, 264, 342, 2288, 3134, 20740, 29526, 194916, 285458, 1885840, 2822310, 18682016, 28440970, 188717116, 291294678, 1937706144, 3025232480, 20173268632, 31797822936, 212530874156, 337731551446, 2262235585956, 3620119437762, 24297593488468
Offset: 1

Views

Author

Panayotis Vlamos, Antonios Panayotopoulos, Georgia Theocharopoulou, Mar 17 2013

Keywords

Comments

A meandering curve of order n is a continuous curve which does not intersect itself yet intersects a horizontal line n times.

References

  • A. Panayotopoulos and P. Tsikouras, Properties of meanders, JCMCC 46 (2003), 181-190.

Crossrefs

Cf. A005315.

Formula

a(n) = A223093(n) * A000034(n). - Andrew Howroyd, Dec 06 2015

A217318 The number of meandering curves of order n, with both extremity covered by its arcs.

Original entry on oeis.org

0, 0, 0, 1, 10, 20, 156, 273, 1986, 3358, 23742, 39736, 277178, 462794, 3205896, 5355743, 36963722, 61856394, 426075994, 714515312, 4916833424, 8263479072, 56840484232, 95733461792, 658460090994, 1111253958664, 7644360501390, 12925362323004, 88938175307354
Offset: 1

Views

Author

Panayotis Vlamos, Antonios Panayotopoulos, and Georgia Theocharopoulou, Mar 18 2013

Keywords

Comments

A meandering curve of order n is a continuous curve which does not intersect itself yet intersects a horizontal line n times.

References

  • A. Panayotopoulos and P. Tsikouras, Properties of meanders, JCMCC 46 (2003), 181-190.

Crossrefs

Cf. A005315.

Formula

a(n) = A223095(n) * A000034(n) / 2. - Andrew Howroyd, Dec 06 2015

A245738 Number of compositions of n into parts 1 and 2 with both parts present.

Original entry on oeis.org

2, 3, 7, 11, 20, 32, 54, 87, 143, 231, 376, 608, 986, 1595, 2583, 4179, 6764, 10944, 17710, 28655, 46367, 75023, 121392, 196416, 317810, 514227, 832039, 1346267, 2178308, 3524576, 5702886, 9227463, 14930351, 24157815, 39088168, 63245984, 102334154, 165580139, 267914295, 433494435, 701408732, 1134903168, 1836311902
Offset: 3

Views

Author

David Neil McGrath, Jul 31 2014

Keywords

Examples

			a(9) = 54. The tuples are (22221) = 5!/4! = 5, (222111) = 6!/3!/3! = 20, (2211111) = 7!/5!/2! = 21, (21111111) = 8!/7! = 8.
		

Crossrefs

Column k=2 of A373118.

Programs

  • Mathematica
    LinearRecurrence[{1,2,-1,-1},{2,3,7,11},50] (* Harvey P. Dale, Dec 20 2014 *)
  • PARI
    Vec(1+1/(1-x-x^2)-1/(1-x)-1/(1-x^2)+O(x^66)) \\ Joerg Arndt, Aug 04 2014

Formula

G.f.: 1+1/(1-x-x^2)-1/(1-x)-1/(1-x^2).
a(n) = A052952(n-4)+2*A052952(n-3). - R. J. Mathar, Aug 05 2014
From Colin Barker, Jul 13 2017: (Start)
a(n) = (-20 + sqrt(5)*(-(1-sqrt(5))^(1+n) + (1+sqrt(5))^(1+n))/2^n) / 10 for n even.
a(n) = (-10 + sqrt(5)*(-(1-sqrt(5))^(1+n) + (1+sqrt(5))^(1+n))/2^n) / 10 for n odd.
a(n) = a(n-1) + 2*a(n-2) - a(n-3) - a(n-4) for n>6. (End)
a(n) = Sum_{i=1..floor((n-1)/2)} C(n-i,i). - Wesley Ivan Hurt, Sep 19 2017
a(n) = A000045(n+1) - A000034(n+1). - J. M. Bergot and Robert Israel, Oct 11 2021

A281660 The least common multiple of 1+n and 1+n^2.

Original entry on oeis.org

1, 2, 15, 20, 85, 78, 259, 200, 585, 410, 1111, 732, 1885, 1190, 2955, 1808, 4369, 2610, 6175, 3620, 8421, 4862, 11155, 6360, 14425, 8138, 18279, 10220, 22765, 12630, 27931, 15392, 33825, 18530, 40495, 22068, 47989, 26030, 56355, 30440, 65641, 35322
Offset: 0

Views

Author

R. J. Mathar, Jan 26 2017

Keywords

Programs

  • Maple
    A281660 := proc(n)
            ilcm(1+n,1+n^2) ;
    end proc:

Formula

a(n) = lcm(1+n,1+n^2) = (1+n)*(1+n^2)/gcd(1+n,1+n^2) = A053698(n)/A000034(n).
G.f.: (5*x^2+1) *(x^4+2*x^3+6*x^2+2*x+1) / ( (x-1)^4 *(1+x)^4 ).
a(2*n+1) = 2*A059722(n+1). - R. J. Mathar, Jan 28 2017
a(n) = ((3 + (-1)^n)*(1+n+n^2+n^3)) / 4. - Colin Barker, Feb 07 2017

A286311 a(n) = 2*a(n-1) - a(n-2) + a(n-4), n>3, a(0)=0, a(1)=a(2)=1, a(3)=3.

Original entry on oeis.org

0, 1, 1, 3, 5, 8, 12, 19, 31, 51, 83, 134, 216, 349, 565, 915, 1481, 2396, 3876, 6271, 10147, 16419, 26567, 42986, 69552, 112537, 182089, 294627, 476717, 771344, 1248060, 2019403, 3267463, 5286867, 8554331, 13841198, 22395528, 36236725, 58632253, 94868979
Offset: 0

Views

Author

Paul Curtz, May 06 2017

Keywords

Comments

Difference table for a(n):
0, 1, 1, 3, 5, 8, 12, 19, 31, 51, 83, 134, 216, ...
1, 0, 2, 2, 3, 4, 7, 12, 20, 32, 51, 82, 133, ...
-1, 2, 0, 1, 1, 3, 5, 8, 12, 19, 31, 51, 83, ...
3, -2, 1, 0, 2, 2, 3, 4, 7, 12, 20, 32, 51, ...
etc.
The pair a(n) = 0, 1, 1, 3, 5, 8, 12, 19, 31, 51, ...
and b(n) = 0, 2, 2, 3, 4, 7, 12, 20, 32, 51, ...
is interesting. a(n) and b(n) are autosequences of the first kind (see Link). a(n) and b(n) have the same first trisection: 3*A001076(n).
a(n) + b(n) = A022086(n) = 3*A000045(n) (Fibonacci).
b(n) - a(n) = 0, 1, 1, 0, -1, -1, 0, ... = A128834(n).
a(n+6) - a(n) = b(n+6) - b(n) = 6*Fib(n+3).
a(n) - a(n) mod 9 = 9*A004699(n) = b(n) - b(n) mod 9.

Crossrefs

Programs

  • Magma
    I:=[0,1,1,3]; [n le 4 select I[n] else 2*Self(n-1) - Self(n-2) + Self(n-4): n in [1..30]]; // G. C. Greubel, Jan 15 2018
  • Mathematica
    LinearRecurrence[{2, -1, 0, 1}, {0, 1, 1, 3}, 40] (* or *)
    CoefficientList[Series[x (1 - x + 2 x^2)/((1 - x + x^2) (1 - x - x^2)), {x, 0, 39}], x] (* Michael De Vlieger, May 07 2017 *)
  • PARI
    concat(0, Vec(x*(1 - x + 2*x^2) / ((1 - x + x^2)*(1 - x - x^2)) + O(x^60))) \\ Colin Barker, May 06 2017
    

Formula

a(n) = 2*a(n-1) - a(n-2) + a(n-4). Valid for b(n).
G.f.: x*(1 - x + 2*x^2) / ((1 - x + x^2)*(1 - x - x^2)). - Colin Barker, May 06 2017

Extensions

More terms from Colin Barker, May 06 2017

A306289 The smallest prime factor of numbers greater than 1 and coprime to 6.

Original entry on oeis.org

5, 7, 11, 13, 17, 19, 23, 5, 29, 31, 5, 37, 41, 43, 47, 7, 53, 5, 59, 61, 5, 67, 71, 73, 7, 79, 83, 5, 89, 7, 5, 97, 101, 103, 107, 109, 113, 5, 7, 11, 5, 127, 131, 7, 137, 139, 11, 5, 149, 151, 5, 157, 7, 163, 167, 13, 173, 5, 179, 181, 5, 11, 191, 193
Offset: 1

Views

Author

Davis Smith, Feb 03 2019

Keywords

Comments

a(n) is the least prime factor of the n-th number that is greater than 1 and congruent to 1 or 5 (mod 6).
a(n) = 5 when n is congruent to {1, 8} (mod 10) (n is a term in A017281, A017365, or A306277). a(n) = 7 when n is congruent to {2, 11} (mod 14) but not {1, 8} (mod 10). a(n) = 11 when n is congruent to {3, 18} (mod 22) but not a case where it equals 5 or 7. a(n) = 13 when n is congruent to {4, 21} (mod 26) (n is a term in A306285) but not a case where it equals 5, 7, or 11. a(n) = 17 when n is congruent to {5, 28} (mod 34) but not a case where it equals 5, 7, 11, or 13. a(n) = 19 when n is congruent to {6, 31} (mod 38) (n is a term in A306331) but not a case where it equals 5, 7, 11, 13, or 17.
Conjecture: This pattern continues indefinitely. a(n) = A007310(m + 1) when n is congruent to {m, A306277(m + 1)} (mod A091999(m + 1)) but not congruent to {k, A306277(k + 1)} (mod A091999(k + 1)), m > k >= 1. The indices of the first appearance of a number in this sequence supports this conjecture in that they are never, for m > 0, congruent to A306277(m + 1) mod A091999(m + 1).

Examples

			a(n) is the least term, other than 0, in n-th row of the array A(m,n), where A(m,n) is A007310(m + 1) when A007310(n + 1) mod A007310(m + 1) is congruent to 0, otherwise 0.
Table begins
  \m  1 2  3  4  5  6  7  8  9  10  11  12  13  14  15  16 ...
  n\
   1| 5 0  0  0  0  0  0  0  0   0   0   0   0   0   0   0 ...
   2| 0 7  0  0  0  0  0  0  0   0   0   0   0   0   0   0 ...
   3| 0 0 11  0  0  0  0  0  0   0   0   0   0   0   0   0 ...
   4| 0 0  0 13  0  0  0  0  0   0   0   0   0   0   0   0 ...
   5| 0 0  0  0 17  0  0  0  0   0   0   0   0   0   0   0 ...
   6| 0 0  0  0  0 19  0  0  0   0   0   0   0   0   0   0 ...
   7| 0 0  0  0  0  0 23  0  0   0   0   0   0   0   0   0 ...
   8| 5 0  0  0  0  0  0 25  0   0   0   0   0   0   0   0 ...
   9| 0 0  0  0  0  0  0  0 29   0   0   0   0   0   0   0 ...
  10| 0 0  0  0  0  0  0  0  0  31   0   0   0   0   0   0 ...
  11| 5 7  0  0  0  0  0  0  0   0  35   0   0   0   0   0 ...
  12| 0 0  0  0  0  0  0  0  0   0   0  37   0   0   0   0 ...
  13| 0 0  0  0  0  0  0  0  0   0   0   0  41   0   0   0 ...
  14| 0 0  0  0  0  0  0  0  0   0   0   0   0  43   0   0 ...
  15| 0 0  0  0  0  0  0  0  0   0   0   0   0   0  47   0 ...
  16| 0 7  0  0  0  0  0  0  0   0   0   0   0   0   0  49 ...
For the n-th row of this square array, the leftmost terms, other than 0, are the factors of A(n,n). A(n,n) = A007310(n + 1). If for every m, m < n, A(m,n) = 0, then a(n) = A007310(n + 1) and A007310(n + 1) is prime.
		

References

  • G. Pólya and G. Szegő, Problems and Theorems in Analysis II (Springer 1924, reprinted 1976), Part Eight, Chap. 2, Section 2, Problems 96 and 105.

Crossrefs

Programs

  • Maple
    seq(min(op(numtheory[factorset] (6*ceil(n/2)+(-1)^n))), n=1..64) ;
  • Mathematica
    FactorInteger[Rest@ Flatten@ Array[6 # + {1, 5} &, 33, 0]][[All, 1, 1]] (* Michael De Vlieger, Feb 15 2019 *)
    FactorInteger[#][[1,1]]&/@Select[Range[2,200],CoprimeQ[#,6]&] (* Harvey P. Dale, Jul 10 2020 *)
  • PARI
    for(n=2, 211, if((n%6==1)||(n%6==5), print1(factor(n)[1,1], ", ")))
    
  • PARI
    vector(64,n,factor(6*ceil(n/2)+(-1)^n)[1,1])
    
  • PARI
    a(n) = n++; factor(n\2*6-(-1)^n)[1,1]; \\ Michel Marcus, Feb 06 2019

Formula

a(n) = A020639(A007310(n + 1)).
a(n) = A020639(3n + A000034(n + 1)).
a(n) = A020639(6*ceiling(n/2) + (-1)^n).
a(floor(prime(n + 2)/3)) = prime(n + 2).

A330372 Irregular triangle read by rows in which row n lists the self-conjugate partitions of n, ordered by their k-th largest parts, or 0 if such partitions does not exist.

Original entry on oeis.org

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

Views

Author

Omar E. Pol, Dec 17 2019

Keywords

Comments

Row n lists the partitions of n whose Ferrers diagrams are symmetrics.
The k-th part of a partition equals the number of parts >= k of its conjugate partition. Hence, the k-th part of a self-conjugate partition equals the number of parts >= k.
The k-th rank of a partition is the k-th part minus the number of parts >= k. Thus all ranks of a conjugate-partitions are zero. Therefore row n lists the partitions of n whose n ranks are zero, n >= 1. For more information about the k-th ranks see A208478.

Examples

			Triangle begins (rows n = 0..10):
[0];
[1];
[0];
[2, 1];
[2, 2];
[3, 1, 1];
[3, 2, 1];
[4, 1, 1, 1];
[4, 2, 1, 1], [3, 3, 2];
[5, 1, 1, 1, 1], [3, 3, 3];
[5, 2, 1, 1, 1], [4, 3, 2, 1];
...
For n = 10 there are only two partitions of 10 whose Ferrers diagram are symmetric, they are [5, 2, 1, 1, 1] and [4, 3, 2, 1] as shown below:
  * * * * *
  * *
  *
  *
  *
            * * * *
            * * *
            * *
            *
So these partitions form the 10th row of triangle.
On the other hand, only two partitions of 10 have all their ranks equal to zero, they are [5, 2, 1, 1, 1] and [4, 3, 2, 1], so these partitions form the 10th row of triangle.
		

Crossrefs

Row n contains A000700(n) partitions.
The number of positive terms in row n is A067619(n).
Row sums give A330373.
Column 2 gives A000034.
Column 3 gives A000012.
For "k-th rank" of a partition see also: A181187, A208478, A208479, A208482, A208483, A330370.

Extensions

More terms from Freddy Barrera, Dec 31 2019

A331952 a(n) = (-7 + (-1)^(1+n) + 6*n^2) / 8.

Original entry on oeis.org

-1, 0, 2, 6, 11, 18, 26, 36, 47, 60, 74, 90, 107, 126, 146, 168, 191, 216, 242, 270, 299, 330, 362, 396, 431, 468, 506, 546, 587, 630, 674, 720, 767, 816, 866, 918, 971, 1026, 1082, 1140, 1199, 1260, 1322, 1386, 1451, 1518, 1586, 1656, 1727, 1800, 1874, 1950, 2027
Offset: 0

Views

Author

Paul Curtz, Feb 02 2020

Keywords

Comments

a(n+1) is once in the hexagonal spiral in A330707. a(n+2) is twice in the same spiral.
a(n) has one odd followed by three evens.
Difference table:
-1, 0, 2, 6, 11, 18, 26, 36, ... = a(n)
1, 2, 4, 5, 7, 8, 10, 11, ... = A001651(n+1)
1, 2, 1, 2, 1, 2, 1, 2, ... = A000034.

Examples

			G.f. = -1 + 2*x^2 + 6*x^3 + 11*x^4 + 18*x^5 + 26*x^6 + 36*x^7 + 47*x^8 + ... - _Michael Somos_, Sep 08 2023
		

Crossrefs

Equals 2 less than A084684, 1 less than A077043, and 1 more than A276382(n-1). - Greg Dresden, Feb 22 2020

Programs

  • Magma
    a:=[-1,0,2,6]; [n le 4 select a[n] else 2*Self(n-1)-2*Self(n-3)+Self(n-4): n in [1..45]]; // Marius A. Burtea, Feb 02 2020
    
  • Mathematica
    LinearRecurrence[{2, 0, -2, 1}, {-1, 0, 2, 6}, 100] (* Amiram Eldar, Feb 02 2020 *)
    a[n_] := Floor[(n^2 - 1)*3/4]; (* Michael Somos, Sep 08 2023 *)
  • PARI
    Vec(-(1 - 2*x - 2*x^2) / ((1 - x)^3*(1 + x)) + O(x^40)) \\ Colin Barker, Feb 03 2020
    
  • PARI
    {a(n) = (n^2 - 1)*3\4}; /* Michael Somos, Sep 08 2023 */

Formula

a(-n) = a(n).
a(20+n) - a(n) = 30*(10+n).
a(2+n) = a(n) + 3*(1+n), a(0)=-1 and a(1)=0.
a(4*n) = 12*n^2 - 1, a(1+4*n) = 6*n*(1+2*n), a(2+4*n) = 2 + 12*n*(1+n), a(3+4*n) = 6*(1+n)*(1+2*n) for n>= 0.
From Colin Barker, Feb 02 2020: (Start)
G.f.: -(1 - 2*x - 2*x^2) / ((1 - x)^3*(1 + x)).
a(n) = 2*a(n-1) - 2*a(n-3) + a(n-4) for n>3.
a(n) = (-7 + (-1)^(1+n) + 6*n^2) / 8.
(End)
E.g.f.: (1/8)*(exp(x)*(6*x^2 + 6*x - 7) - exp(-x)). - Stefano Spezia, Feb 02 2020 after Colin Barker
a(n) = floor((n^2 - 1)*3/4). - Michael Somos, Sep 09 2023

Extensions

a(42)-a(52) from Stefano Spezia, Feb 02 2020
Previous Showing 81-90 of 142 results. Next