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

A250419 T(n,k)=Number of length n+1 0..k arrays with the sum of the minimum of each adjacent pair multiplied by some arrangement of +-1 equal to zero.

Original entry on oeis.org

3, 5, 6, 7, 17, 10, 9, 36, 38, 20, 11, 65, 99, 125, 36, 13, 106, 205, 476, 335, 72, 15, 161, 370, 1351, 1693, 1061, 136, 17, 232, 606, 3154, 5982, 7504, 3069, 272, 19, 321, 927, 6433, 16790, 34415, 29221, 9495, 528, 21, 430, 1345, 11906, 39916, 119364, 169352
Offset: 1

Views

Author

R. H. Hardin, Nov 22 2014

Keywords

Comments

Table starts
....3.....5.......7........9........11........13.........15..........17
....6....17......36.......65.......106.......161........232.........321
...10....38......99......205.......370.......606........927........1345
...20...125.....476.....1351......3154......6433......11906.......20461
...36...335....1693.....5982.....16790.....39916......84094......161350
...72..1061....7504....34415....119364....341011.....845358.....1878315
..136..3069...29221...169352....713260...2399000....6847916....17247435
..272..9495..123242...904695...4620694..18334295...60473968...173147889
..528.28221..492076..4547008..28033122.130350889..493271080..1595410130
.1056.86149.2021436.23448029.174036890.947356115.4110606460.15000578409

Examples

			Some solutions for n=5 k=4
..3....0....3....1....3....3....2....1....2....0....0....1....2....4....0....3
..1....2....1....0....4....2....0....3....1....0....0....0....4....0....2....0
..4....0....0....0....1....4....3....2....2....0....1....0....3....2....2....0
..3....2....2....2....4....2....0....0....1....2....1....4....2....1....4....2
..2....3....3....0....4....4....4....3....2....1....4....1....3....4....1....1
..1....2....1....1....3....4....0....3....3....1....0....3....3....0....2....1
		

Crossrefs

Column 1 is A005418(n+2)
Row 1 is A004273(n+1)
Row 2 is A084990(n+1)

Formula

Empirical for column k:
k=1: a(n) = 2*a(n-1) +2*a(n-2) -4*a(n-3)
k=2: [order 10]
k=3: [order 29]
Empirical for row n:
n=1: a(n) = 2*n + 1
n=2: a(n) = (1/3)*n^3 + 2*n^2 + (8/3)*n + 1
n=3: a(n) = 3*a(n-1) -2*a(n-2) -2*a(n-3) +3*a(n-4) -a(n-5); also a cubic polynomial plus a constant quasipolynomial with period 2
n=4: [linear recurrence of order 10; also a quintic polynomial plus a linear quasipolynomial with period 3]
n=5: [order 17; also a quintic polynomial plus a quadratic quasipolynomial with period 12]

A201811 T(n,k)=Number of arrays of n integers in -k..k with sum zero and equal numbers of elements greater than zero and less than zero.

Original entry on oeis.org

1, 1, 3, 1, 5, 7, 1, 7, 13, 19, 1, 9, 19, 61, 51, 1, 11, 25, 151, 221, 141, 1, 13, 31, 313, 631, 1001, 393, 1, 15, 37, 571, 1401, 4621, 4145, 1107, 1, 17, 43, 949, 2651, 15681, 23857, 18733, 3139, 1, 19, 49, 1471, 4501, 42821, 90609, 164599, 82381, 8953, 1, 21, 55, 2161
Offset: 1

Views

Author

R. H. Hardin Dec 05 2011

Keywords

Comments

Table starts
....1......1.......1........1.........1..........1..........1...........1
....3......5.......7........9........11.........13.........15..........17
....7.....13......19.......25........31.........37.........43..........49
...19.....61.....151......313.......571........949.......1471........2161
...51....221.....631.....1401......2651.......4501.......7071.......10481
..141...1001....4621....15681.....42821......99961.....207621......394241
..393...4145...23857....90609....263201.....637393....1355145.....2613857
.1107..18733..164599...909945...3688091...12004357...33222463....81196529
.3139..82381..948871..6105913..27050251...93039589..266948431...668734321
.8953.375745.6359617.57290209.343631641.1554288913.5714583505.17932764577

Examples

			Some solutions for n=7 k=3
..0...-1...-3....2...-1...-2....3....0....1...-2....0....3...-2...-3....2...-3
.-1....1....1...-2....1....2....3....2...-1...-3...-2....0...-2....3....2....3
..2....0....0....3...-2...-2...-3....2....1....0....2...-3....0...-1...-1....2
..0....1....2...-3....2...-1....2...-2....0....3...-1...-1....1....1...-2...-3
..1...-3...-1....3...-2....0....0....2....1...-3....1...-3...-3....0....1...-1
..0....3....2...-3....0....2...-2...-2...-1....2....1....3....3....2...-2....0
.-2...-1...-1....0....2....1...-3...-2...-1....3...-1....1....3...-2....0....2
		

Crossrefs

Column 1 is A002426
Row 2 is A004273(n+1)
Row 3 is A016921

Formula

Empirical for rows:
T(1,k) = 1
T(2,k) = 2*k + 1
T(3,k) = 6*k + 1
T(4,k) = 4*k^3 + 14*k + 1
T(5,k) = 20*k^3 + 30*k + 1
T(6,k) = 11*k^5 + 65*k^3 + 64*k + 1
T(7,k) = 77*k^5 + 175*k^3 + 140*k + 1
T(8,k) = (302/9)*k^7 + (2912/9)*k^5 + (3878/9)*k^3 + 318*k + 1
T(9,k) = 302*k^7 + 1064*k^5 + 1022*k^3 + 750*k + 1
T(10,k) = (15619/144)*k^9 + (37465/24)*k^7 + (146209/48)*k^5 + (86705/36)*k^3 + 1828*k + 1
T(11,k) = (171809/144)*k^9 + (48785/8)*k^7 + (386155/48)*k^5 + (206635/36)*k^3 + 4576*k + 1

A201042 T(n,k)=Number of -k..k arrays of n elements with adjacent element differences also in -k..k.

Original entry on oeis.org

3, 5, 7, 7, 19, 17, 9, 37, 75, 41, 11, 61, 203, 295, 99, 13, 91, 429, 1111, 1161, 239, 15, 127, 781, 3011, 6083, 4569, 577, 17, 169, 1287, 6691, 21141, 33305, 17981, 1393, 19, 217, 1975, 13021, 57343, 148433, 182349, 70763, 3363, 21, 271, 2873, 23045, 131781
Offset: 1

Views

Author

R. H. Hardin Nov 26 2011

Keywords

Comments

Table starts
....3.......5........7.........9.........11..........13..........15
....7......19.......37........61.........91.........127.........169
...17......75......203.......429........781........1287........1975
...41.....295.....1111......3011.......6691.......13021.......23045
...99....1161.....6083.....21141......57343......131781......268983
..239....4569....33305....148433.....491429.....1333683.....3139529
..577...17981...182349...1042167....4211559....13497523....36644243
.1393...70763...998383...7317185...36093157...136601483...427707523
.3363..278483..5466269..51374875..309319197..1382473365..4992154799
.8119.1095951.29928491.360709449.2650872719.13991301963.58267877227

Examples

			Some solutions for n=4 k=7
.-5...-1....2....2...-3....4...-4....4....5....2...-6...-1....1....4....2....0
.-3....0....3....1....2....4...-3....4....2...-5....1....6....5....7....4....0
.-5...-5...-4...-3....2...-2....1....5....7...-7....0....2....4....1....1....2
.-7...-1....2...-6....1...-1...-5....7....0...-1...-5....6...-3....5...-1....2
		

Crossrefs

Column 1 is A001333(n+1)
Column 2 is A126392
Column 3 is A126475
Column 4 is A126504
Column 5 is A126532
Row 1 is A004273(n+1)
Row 2 is A003215
Row 3 is A063494(n+1)

Formula

Empirical for columns:
k=1: a(n) = 2*a(n-1) +a(n-2)
k=2: a(n) = 4*a(n-1) -a(n-3)
k=3: a(n) = 5*a(n-1) +3*a(n-2) -2*a(n-3) -a(n-4)
k=4: a(n) = 7*a(n-1) +a(n-2) -6*a(n-3) +a(n-5)
k=5: a(n) = 8*a(n-1) +6*a(n-2) -9*a(n-3) -5*a(n-4) +2*a(n-5) +a(n-6)
k=6: a(n) = 10*a(n-1) +3*a(n-2) -18*a(n-3) -a(n-4) +8*a(n-5) -a(n-7)
k=7: a(n) = 11*a(n-1) +10*a(n-2) -24*a(n-3) -15*a(n-4) +13*a(n-5) +7*a(n-6) -2*a(n-7) -a(n-8)
Empirical for rows:
n=1: a(k) = 2*k + 1
n=2: a(k) = 3*k^2 + 3*k + 1
n=3: a(k) = (14/3)*k^3 + 7*k^2 + (13/3)*k + 1
n=4: a(k) = (29/4)*k^4 + (29/2)*k^3 + (51/4)*k^2 + (11/2)*k + 1
n=5: a(k) = (169/15)*k^5 + (169/6)*k^4 + 32*k^3 + (119/6)*k^2 + (101/15)*k + 1
n=6: a(k) = (2101/120)*k^6 + (2101/40)*k^5 + (1753/24)*k^4 + (1405/24)*k^3 + (569/20)*k^2 + (119/15)*k + 1
n=7: a(k) = (17141/630)*k^7 + (17141/180)*k^6 + (28177/180)*k^5 + (2759/18)*k^4 + (17299/180)*k^3 + (6929/180)*k^2 + (1921/210)*k + 1

A214546 First differences of A140472.

Original entry on oeis.org

1, 1, 0, 2, -1, 1, 0, 4, -3, 1, 0, 2, -1, 1, 0, 8, -7, 1, 0, 2, -1, 1, 0, 4, -3, 1, 0, 2, -1, 1, 0, 16, -15, 1, 0, 2, -1, 1, 0, 4, -3, 1, 0, 2, -1, 1, 0, 8, -7, 1, 0, 2, -1, 1, 0, 4, -3, 1, 0, 2, -1, 1, 0, 32, -31, 1, 0, 2, -1, 1, 0, 4, -3, 1, 0, 2, -1, 1, 0
Offset: 0

Views

Author

Reinhard Zumkeller, Jul 20 2012

Keywords

Comments

a(n) = A140472(n+1) - A140472(n);
a(A016825(n)) = 0; a(A042965(n)) <> 0;
for n > 0: a(A008586(n)) < 0, a(A005843(n)) <= 0, a(A042968(n)) >= 0;
a(A004273(n)) > 0.

Crossrefs

Cf. A093879.

Programs

  • Haskell
    a214546 n = a214546_list !! n
    a214546_list = zipWith (-) (tail a140472_list) a140472_list

A001204 Continued fraction for e^2.

Original entry on oeis.org

7, 2, 1, 1, 3, 18, 5, 1, 1, 6, 30, 8, 1, 1, 9, 42, 11, 1, 1, 12, 54, 14, 1, 1, 15, 66, 17, 1, 1, 18, 78, 20, 1, 1, 21, 90, 23, 1, 1, 24, 102, 26, 1, 1, 27, 114, 29, 1, 1, 30, 126, 32, 1, 1, 33, 138, 35, 1, 1, 36, 150, 38, 1, 1, 39, 162, 41, 1, 1, 42, 174, 44, 1, 1, 45, 186, 47, 1, 1
Offset: 0

Views

Author

Keywords

Comments

Note that e^2 = 7 + 2/(5 + 1/(7 + 1/(9 + 1/(11 + ...)))) (follows from the fact that A004273 is the continued fraction expansion of tanh(1) = (e^2 - 1)/(e^2 + 1)). - Peter Bala, Jan 15 2022

Examples

			7.389056098930650227230427460... = 7 + 1/(2 + 1/(1 + 1/(1 + 1/(3 + ...)))).
		

References

  • Oskar Perron, Die Lehre von den Kettenbrüchen, 2nd ed., Teubner, Leipzig, 1929, p. 138.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Mathematica
    ContinuedFraction[ E^2, 100]
    LinearRecurrence[{0,0,0,0,2,0,0,0,0,-1},{7,2,1,1,3,18,5,1,1,6,30},80] (* Harvey P. Dale, Dec 30 2023 *)
  • PARI
    contfrac(exp(2))
    
  • PARI
    allocatemem(932245000); default(realprecision, 95000); x=contfrac(exp(2)); for (n=1, 20001, write("b001204.txt", n-1, " ", x[n])); \\ Harry J. Smith, Apr 30 2009

Formula

G.f.: (x^10 - x^8 - x^7 + x^6 + 4x^5 + 3x^4 + x^3 + x^2 + 2x + 7)/(x^5 - 1)^2. - Ralf Stephan, Mar 23 2003
For n > 0, a(5n) = 12n + 6, a(5n+1) = 3n + 2, a(5n+2) = a(5n+3) = 1 and a(5n+4) = 3n + 3. - Dean Hickerson, Mar 25 2003
Sum_{n>=5} (-1)^(n+1)/a(n) = (8*sqrt(3)-3)*Pi/72 - 2*log(2)/3. - Amiram Eldar, May 04 2025

Extensions

More terms from Robert G. Wilson v, Dec 07 2000

A193376 T(n,k) = number of ways to place any number of 2 X 1 tiles of k distinguishable colors into an n X 1 grid; array read by descending antidiagonals, with n, k >= 1.

Original entry on oeis.org

1, 1, 2, 1, 3, 3, 1, 4, 5, 5, 1, 5, 7, 11, 8, 1, 6, 9, 19, 21, 13, 1, 7, 11, 29, 40, 43, 21, 1, 8, 13, 41, 65, 97, 85, 34, 1, 9, 15, 55, 96, 181, 217, 171, 55, 1, 10, 17, 71, 133, 301, 441, 508, 341, 89, 1, 11, 19, 89, 176, 463, 781, 1165, 1159, 683, 144, 1, 12, 21, 109, 225, 673
Offset: 1

Views

Author

R. H. Hardin, Jul 24 2011

Keywords

Comments

Transposed variant of A083856. - R. J. Mathar, Aug 23 2011
As to the sequences by columns beginning (1, N, ...), let m = (N-1). The g.f. for the sequence (1, N, ...) is 1/(1 - x - m*x^2). Alternatively, the corresponding matrix generator is [[1,1], [m,0]]. Another equivalency is simply: The sequence beginning (1, N, ...) is the INVERT transform of (1, m, 0, 0, 0, ...). Convergents to the sequences a(n)/a(n-1) are (1 + sqrt(4*m+1))/2. - Gary W. Adamson, Feb 25 2014

Examples

			Array T(n,k) (with rows n >= 1 and column k >= 1) begins as follows:
  ..1...1....1....1.....1.....1.....1......1......1......1......1......1...
  ..2...3....4....5.....6.....7.....8......9.....10.....11.....12.....13...
  ..3...5....7....9....11....13....15.....17.....19.....21.....23.....25...
  ..5..11...19...29....41....55....71.....89....109....131....155....181...
  ..8..21...40...65....96...133...176....225....280....341....408....481...
  .13..43...97..181...301...463...673....937...1261...1651...2113...2653...
  .21..85..217..441...781..1261..1905...2737...3781...5061...6601...8425...
  .34.171..508.1165..2286..4039..6616..10233..15130..21571..29844..40261...
  .55.341.1159.2929..6191.11605.19951..32129..49159..72181.102455.141361...
  .89.683.2683.7589.17621.35839.66263.113993.185329.287891.430739.624493...
  ...
Some solutions for n = 5 and k = 3 with colors = 1, 2, 3 and empty = 0:
..0....2....3....2....0....1....0....0....2....0....0....2....3....0....0....0
..0....2....3....2....2....1....2....3....2....1....0....2....3....1....1....1
..1....0....0....0....2....0....2....3....2....1....0....1....0....1....1....1
..1....2....2....0....3....2....2....3....2....0....3....1....3....3....2....1
..0....2....2....0....3....2....2....3....0....0....3....0....3....3....2....1
		

Crossrefs

Column 1 is A000045(n+1), column 2 is A001045(n+1), column 3 is A006130, column 4 is A006131, column 5 is A015440, column 6 is A015441(n+1), column 7 is A015442(n+1), column 8 is A015443, column 9 is A015445, column 10 is A015446, column 11 is A015447, and column 12 is A053404,
Row 2 is A000027(n+1), row 3 is A004273(n+1), row 4 is A028387, row 5 is A000567(n+1), and row 6 is A106734(n+2).
Diagonal is A171180, superdiagonal 1 is A083859(n+1), and superdiagonal 2 is A083860(n+1).

Programs

  • Maple
    T:= proc(n,k) option remember; `if`(n<0, 0,
          `if`(n<2 or k=0, 1, k*T(n-2, k) +T(n-1, k)))
        end;
    seq(seq(T(n, d+1-n), n=1..d), d=1..12); # Alois P. Heinz, Jul 29 2011
  • Mathematica
    T[n_, k_] := T[n, k] = If[n < 0, 0, If[n < 2 || k == 0, 1, k*T[n-2, k]+T[n-1, k]]]; Table[Table[T[n, d+1-n], {n, 1, d}], {d, 1, 12}] // Flatten (* Jean-François Alcover, Mar 04 2014, after Alois P. Heinz *)

Formula

With z X 1 tiles of k colors on an n X 1 grid (with n >= z), either there is a tile (of any of the k colors) on the first spot, followed by any configuration on the remaining (n-z) X 1 grid, or the first spot is vacant, followed by any configuration on the remaining (n-1) X 1. Thus, T(n,k) = T(n-1,k) + k*T(n-z,k), with T(n,k) = 1 for n = 0, 1, ..., z-1.
The solution is T(n,k) = Sum_r r^(-n-1)/(1 + z*k*r^(z-1)), where the sum is over the roots r of the polynomial k*x^z + x - 1.
For z = 2, T(n,k) = ((2*k / (sqrt(1 + 4*k) - 1))^(n+1) - (-2*k/(sqrt(1 + 4*k) + 1))^(n+1)) / sqrt(1 + 4*k).
T(n,k) = Sum_{s=0..[n/2]} binomial(n-s,s) * k^s.
For z X 1 tiles, T(n,k,z) = Sum_{s = 0..[n/z]} binomial(n-(z-1)*s, s) * k^s. - R. H. Hardin, Jul 31 2011

Extensions

Formula and proof from Robert Israel in the Sequence Fans mailing list.

A219502 T(n,k)=Number of nXk arrays of the minimum value of corresponding elements and their horizontal or vertical neighbors in a random, but sorted with lexicographically nondecreasing rows and nonincreasing columns, 0..1 nXk array.

Original entry on oeis.org

2, 2, 2, 3, 3, 3, 4, 5, 5, 4, 5, 7, 11, 7, 5, 6, 9, 18, 18, 9, 6, 7, 11, 26, 35, 26, 11, 7, 8, 13, 35, 58, 58, 35, 13, 8, 9, 15, 45, 88, 107, 88, 45, 15, 9, 10, 17, 56, 126, 179, 179, 126, 56, 17, 10, 11, 19, 68, 173, 281, 325, 281, 173, 68, 19, 11, 12, 21, 81, 230, 421, 550, 550, 421
Offset: 1

Views

Author

R. H. Hardin Nov 20 2012

Keywords

Comments

Table starts
..2..2...3...4....5....6.....7.....8.....9....10....11....12....13....14....15
..2..3...5...7....9...11....13....15....17....19....21....23....25....27....29
..3..5..11..18...26...35....45....56....68....81....95...110...126...143...161
..4..7..18..35...58...88...126...173...230...298...378...471...578...700...838
..5..9..26..58..107..179...281...421...608...852..1164..1556..2041..2633..3347
..6.11..35..88..179..325...550...885..1369..2050..2986..4246..5911..8075.10846
..7.13..45.126..281..550...995..1703..2793..4424..6804.10200.14949.21470.30277
..8.15..56.173..421..885..1703..3083..5328..8869.14306.22458.34423.51649.76017
..9.17..68.230..608.1369..2793..5328..9663.16831.28346.46382.74003
.10.19..81.298..852.2050..4424..8869.16831.30581.53601.91116
.11.21..95.378.1164.2986..6804.14306.28346.53601.97541
.12.23.110.471.1556.4246.10200.22458.46382.91116

Examples

			Some solutions for n=3 k=4
..0..0..0..0....0..0..0..0....0..0..0..0....1..0..0..0....1..0..0..0
..0..0..0..0....0..0..0..0....1..0..0..0....1..1..0..0....1..0..0..0
..1..0..0..0....1..1..1..0....1..1..1..0....1..1..1..0....1..0..0..0
		

Crossrefs

Column 1 is A000027
Column 2 is A004273
Column 3 is A056000(n-1) for n>1

Formula

Empirical for column k:
k=1: a(n) = n for n>1
k=2: a(n) = 2*n - 1 for n>1
k=3: a(n) = (1/2)*n^2 + (7/2)*n - 4 for n>1
k=4: a(n) = (1/6)*n^3 + n^2 + (23/6)*n - 7 for n>2
k=5: a(n) = (1/24)*n^4 + (1/4)*n^3 + (35/24)*n^2 + (21/4)*n - 13 for n>2
k=6: a(n) = (1/120)*n^5 + (1/24)*n^4 + (13/24)*n^3 + (59/24)*n^2 + (59/20)*n - 17 for n>3
k=7: a(n) = (1/720)*n^6 + (1/240)*n^5 + (23/144)*n^4 + (13/16)*n^3 + (331/180)*n^2 + (311/60)*n - 27 for n>3

A251603 Numbers k such that k + 2 divides k^k - 2.

Original entry on oeis.org

3, 4551, 46775, 82503, 106976, 1642796, 4290771, 4492203, 4976427, 21537831, 21549347, 21879936, 51127259, 56786087, 60296571, 80837771, 87761787, 94424463, 96593696, 138644871, 168864999, 221395539, 255881451, 297460451, 305198247, 360306363, 562654203
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Dec 05 2014

Keywords

Comments

Numbers k such that (k^k - 2)/(k + 2) is an integer.
Since k == -2 (mod k+2), also numbers k such that k + 2 divides (-2)^k - 2. - Robert Israel, Jan 04 2015
Numbers k == 0 (mod 4) such that A066602(k/2+1) = 8, and odd numbers k such that k = 3 or A082493(k+2) = 8. - Robert Israel, Apr 08 2015

Examples

			3 is in this sequence because 3 + 2 = 5 divides 3^3 - 2 = 25.
		

Crossrefs

Programs

  • Magma
    [n: n in [0..10000] | Denominator((n^n-2)/(n+2)) eq 1];
    
  • Maple
    isA251603 := proc(n)
        if modp(n &^ n-2,n+2) = 0 then
            true;
        else
            false;
        end if;
    end proc:
    A251603 := proc(n)
        option remember;
        local a;
        if n = 1 then
            3;
        else
            for a from procname(n-1)+1 do
                if isA251603(a) then
                    return a;
                end if;
            end do:
        end if;
    end proc: # R. J. Mathar, Jan 09 2015
  • Mathematica
    Select[Range[10^6], Mod[PowerMod[#, #, # + 2] - 2, # + 2] == 0 &] (* Michael De Vlieger, Dec 20 2014, based on Robert G. Wilson v at A252041 *)
  • PARI
    for(n=1,10^9,if(Mod(n,n+2)^n==+2,print1(n,", "))); \\ Joerg Arndt, Dec 06 2014
    
  • Python
    A251603_list = [n for n in range(1,10**6) if pow(n, n, n+2) == 2] # Chai Wah Wu, Apr 13 2015

Formula

The even terms form A122711, the odd terms are those in A245319 (forming A357125) decreased by 2. - Max Alekseyev, Sep 22 2016

Extensions

a(6)-a(27) from Joerg Arndt, Dec 06 2014

A047245 Numbers that are congruent to {1, 2, 3} mod 6.

Original entry on oeis.org

1, 2, 3, 7, 8, 9, 13, 14, 15, 19, 20, 21, 25, 26, 27, 31, 32, 33, 37, 38, 39, 43, 44, 45, 49, 50, 51, 55, 56, 57, 61, 62, 63, 67, 68, 69, 73, 74, 75, 79, 80, 81, 85, 86, 87, 91, 92, 93, 97, 98, 99, 103, 104, 105, 109, 110, 111, 115, 116, 117, 121, 122, 123
Offset: 1

Views

Author

Keywords

Comments

a(k)^m is a term iff {a(k) is odd and m is a nonnegative integer} or {m is in A004273}. - Jerzy R Borysowicz, May 08 2023

Crossrefs

Cf. A047240, A047244, A047258 (complement).

Programs

Formula

From Johannes W. Meijer, Jun 07 2011: (Start)
a(n) = ceiling(n/3) + ceiling((n-1)/3) + ceiling((n-2)/3) + 3*ceiling((n-3)/3).
G.f.: x*(1+x+x^2+3*x^3)/((x-1)^2*(x^2+x+1)). (End)
a(n) = 3*floor((n-1)/3) + n. - Gary Detlefs, Dec 22 2011
From Wesley Ivan Hurt, Apr 13 2015: (Start)
a(n) = a(n-1) + a(n-3) - a(n-4) for n>4.
a(n) = 2*n-3 + ((2*n-3) mod 3). (End)
From Wesley Ivan Hurt, Jun 13 2016: (Start)
a(n) = 2*n - 2 - cos(2*n*Pi/3) + sin(2*n*Pi/3)/sqrt(3).
a(3k) = 6k-3, a(3k-1) = 6k-4, a(3k-2) = 6k-5. (End)
Sum_{n>=1} (-1)^(n+1)/a(n) = (9-2*sqrt(3))*Pi/36 + log(2+sqrt(3))/(2*sqrt(3)) - log(2)/6. - Amiram Eldar, Dec 14 2021

A055081 Number of positive integers whose harmonic mean with n is a positive integer.

Original entry on oeis.org

1, 2, 3, 3, 3, 7, 3, 4, 5, 6, 3, 10, 3, 6, 10, 5, 3, 11, 3, 10, 9, 6, 3, 13, 5, 6, 7, 10, 3, 20, 3, 6, 9, 6, 10, 16, 3, 6, 9, 13, 3, 20, 3, 9, 17, 6, 3, 16, 5, 10, 9, 9, 3, 15, 9, 13, 9, 6, 3, 30, 3, 6, 16, 7, 9, 20, 3, 9, 9, 19, 3, 22, 3, 6, 16, 9, 10, 19, 3, 16, 9, 6, 3, 30, 9, 6, 9, 13, 3, 33
Offset: 1

Views

Author

Henry Bottomley, Jun 13 2000

Keywords

Comments

Also the number of factors of 2n^2 which are less than 2n, since the harmonic mean of n and 2n^2/k-n is 2n-k and these are all positive integers iff k<2n is a factor of 2n^2. So a(n)=3 iff n=4 or n is an odd prime.
For any n>2, there are three distinct trivial Diophantine solutions of H(n,x)=y, H being the harmonic mean: [x=n,y=n],[x=n(n-1),y=2(n-1)],[x=n(2n-1),y=2n-1]. Existence of any other solution proves that n is not a prime. - Stanislav Sykora, Feb 03 2016
a(n)=4 only for n=8. a(n)=5 iff n is 16 or the square of an odd prime. - Robert Israel, Feb 07 2016

Examples

			a(6)=7 since the pairwise harmonic means of 6 with 2, 3, 6, 12, 18, 30 and 66 are 3, 4, 6, 8, 9, 10 and 11 respectively.
		

Crossrefs

The smallest and largest positive integers whose harmonic means with n are positive integers are A053626 and A000384 with harmonic means of A053627 and A004273.

Programs

  • Maple
    seq(nops(select(`<`,numtheory:-divisors(2*n^2),2*n)),n=1..100); # Robert Israel, Feb 07 2016
  • Mathematica
    Count[Divisors[2 #^2], x_ /; x < 2 #] & /@ Range[90] (* Ivan Neretin, May 04 2015 *)
  • PARI
    a(n) = {my(c=0); for(y=1, 2*n-1, if((y*n)%(2*n-y)==0, c++)); return(c);} \\ Stanislav Sykora, Feb 03 2016

Formula

a(n) >= min(n,3). - Stanislav Sykora, Feb 03 2016
a(2^n) = n+1, a(p^n) = 2n+1 if p>=3 is prime. - Benoit Cloitre, Nov 26 2023
Previous Showing 11-20 of 33 results. Next