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

A176792 Primes in A014293.

Original entry on oeis.org

7, 79, 1021, 3486784393, 155568095557812211, 6176733962839469999999999999999999999999999971
Offset: 1

Views

Author

Jonathan Vos Post, Dec 07 2010

Keywords

Comments

Prime solutions to the classical "Monkey and Coconut Problem." Primes of the form n^(n+1)-n+1. A014293(n) is prime for n = 2, 3, 4, 9, 14, 30, 62, 75, 156, ..., .
The next term has 113 digits.

Examples

			A014293(0) = A014293(1) = 1 is nonprime, so 1 is not in this sequence.
A014293(2) = 7 is prime, so 7 is in this sequence.
A014293(3) = 79 is prime, so 79 is in this sequence.
A014293(4) = 1021 is prime, so 1021 is in this sequence.
A014293(5) = 15621 = 3 * 41 * 127 is nonprime, so 15621 is not in this sequence.
		

Crossrefs

Cf. A000040.

Programs

  • Magma
    [ a: n in [0..250] | IsPrime(a) where a is (n^(n+1)-n+1)] // Vincenzo Librandi, Jan 30 2011
  • Mathematica
    Select[#^(# + 1) - # + 1 & /@ Range@ 75, PrimeQ]

Formula

{n^(n+1)-n+1 : n nonnegative integer and n^(n+1)-n+1 in A000040} == A014293 INTERSECTION A000040.

A085606 a(n) = (n-1)^n - 1.

Original entry on oeis.org

0, -1, 0, 7, 80, 1023, 15624, 279935, 5764800, 134217727, 3486784400, 99999999999, 3138428376720, 106993205379071, 3937376385699288, 155568095557812223, 6568408355712890624, 295147905179352825855, 14063084452067724991008, 708235345355337676357631
Offset: 0

Views

Author

Lekraj Beedassy, Jul 07 2003

Keywords

Comments

Sequence relates to the "monkey and coconut problem"(A014293) giving the number of coconuts received by each of the n sailors from the ultimate equitable distribution the next day.
From Alexander Adamchuk, Nov 13 2006: (Start)
4n^2 divides a(2n).
Odd prime p divides a(p-1).
8p^2 divides a(2p) for an odd prime p.
32p^4 divides a(2p^2) for an odd prime p.
64p^8 divides a(2p^4) for an odd prime p.
p^3 divides a(p^3+2) for prime p.
p divides a((p-1)/2) for prime p in A157437.
p^2 divides a((p-1)/2) for prime p = {5,127,607}. (End)

Crossrefs

Programs

Formula

a(n) = A065440(n) - 1.

Extensions

More terms from Ray Chandler, Nov 10 2003

A006091 a(n) = n^n - n + 1.

Original entry on oeis.org

1, 3, 25, 253, 3121, 46651, 823537, 16777209, 387420481, 9999999991, 285311670601, 8916100448245, 302875106592241, 11112006825558003, 437893890380859361, 18446744073709551601, 827240261886336764161, 39346408075296537575407, 1978419655660313589123961
Offset: 1

Views

Author

Keywords

Comments

Related to famous "coconuts" problem - cf. A002021, A002022.

References

  • Archimedeans Problems Drive, Eureka, 41 (1981), 7.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A014293.

Programs

Formula

E.g.f.: 1/(1 + LambertW(-x)) + exp(x)*(1 - x) - 2. - Ilya Gutkovskiy, Oct 30 2017

A254029 Positive solutions of Monkey and Coconuts Problem for the classic case (5 sailors, 1 coconut to the monkey): a(n) = 15625*n - 4 for n >= 1.

Original entry on oeis.org

15621, 31246, 46871, 62496, 78121, 93746, 109371, 124996, 140621, 156246, 171871, 187496, 203121, 218746, 234371, 249996, 265621, 281246, 296871, 312496, 328121, 343746, 359371, 374996, 390621, 406246, 421871, 437496, 453121, 468746
Offset: 1

Views

Author

Luciano Ancora, Mar 14 2015

Keywords

Comments

References

  • Charles S. Ogilvy and John T. Anderson, Excursions in Number Theory, Oxford University Press, 1966, pages 52-54.
  • Miodrag S. Petković, "The sailors, the coconuts, and the monkey", Famous Puzzles of Great Mathematicians, Amer. Math. Soc.(AMS), 2009, pages 52-56.

Crossrefs

Programs

  • Mathematica
    s = 5; c = 1; Table[n s^(s + 1) - c (s - 1), {n, 1, 30}] (* or *)
    CoefficientList[Series[(15621 + 4 x)/(-1 + x)^2, {x, 0, 29}], x]

Formula

G.f.: x*(15621 + 4*x)/(1 - x)^2.
a(n) = 2*a(n-1) - a(n-2) = a(n-1) + 15625, with a(0) = -4 and a(-1) = -(4 + 5^6). a(n) = 5^6*n - 4.
a(n) = (15*c(n) + 11) + 265*(c(n) + 1)/2^10, with c(n) = A158421(n) = 2^10*n - 1, for n >= 1. - Richard S. Fischer and Wolfdieter Lang, Jun 01 2023

A362359 Triangle T read by rows, obtained from the array A for the solutions of the Monkey and Coconuts Problem (s sailors and one coconut to the monkey).

Original entry on oeis.org

1, 2, 7, 3, 15, 79, 4, 23, 160, 1021, 5, 31, 241, 2045, 15621, 6, 39, 322, 3069, 31246, 279931, 7, 47, 403, 4093, 46871, 559867, 5764795, 8, 55, 484, 5117, 62496, 839803, 11529596, 134217721, 9, 63, 565, 6141, 78121, 1119739, 17294397, 268435449, 3486784393, 10, 71, 646, 7165, 93746, 1399675, 23059198, 402653177, 6973568794, 99999999991
Offset: 1

Views

Author

Richard S. Fischer and Wolfdieter Lang, Jun 20 2023

Keywords

Comments

For the five sailors and one monkey problem see A254029.
The rows s of the array A give the positive solutions to the following problem: Recurrence co(k) = ((s-1)/s)*(co(k-1) - 1), for k >= 0, with co(0) = a, and the requirement c0(s) - 1 == 0 (mod s), for s >= 1. Then a = a(s, n) = A(s, n), for n >= 1.

Examples

			The array A begins:
s\n     1      2      3       4       5       6       7       8       9 ...
---------------------------------------------------------------------------
1:      1      2      3       4       5       6       7       8       9 ...
2:      7     15     23      31      39      47      55      63      71 ...
3:     79    160    241     322     403     484     565     646     727 ...
4:   1021   2045   3069    4093    5117    6141    7165    8189    9213 ...
5:  15621  31246  46871   62496   78121   93746  109371  124996  140621 ...
6: 279931 559867 839803 1119739 1399675 1679611 1959547 2239483 2519419 ...
...
s = 7: 5764795 11529596 17294397 23059198 28823999 34588800 40353601 46118402 51883203 57648004, ...
...
-----------------------------------------------------------------------------
The triangle begins:
  n\k  1  2   3    4     5       6        7         8          9          10
  ---------------------------------------------------------------------------
  1:   1
  2:   2  7
  3:   3 15  79
  4    4 23 160 1021
  5:   5 31 241 2045 15621
  6:   6 39 322 3069 31246  279931
  7:   7 47 403 4093 46871  559867  5764795
  8:   8 55 484 5117 62496  839803 11529596 134217721
  9:   9 63 565 6141 78121 1119739 17294397 268435449 3486784393
 10:  10 71 646 7165 93746 1399675 23059198 402653177 6973568794 99999999991
 ...
-----------------------------------------------------------------------------
		

Crossrefs

Rows of array A (columns of triangle T starting with index n): A000027, A004771(n-1), A362360, A362361, A254029.
First column of array A (diagonal of triangle T): A014293.

Programs

Formula

T(n, k) = A(k, n - k + 1), with the array A(s, n) = n*s^(s+1) - (s - 1), for s >= 1 and n >= 1. (Array read by antidiagonals downwards.)
T(n, k) = (n - k + 1)*k^(k+1) - (k - 1), for k = 1, 2, ..., n.
O.g.f. for row s of array A: (x/(1 - x)^2)*(s^(s + 1) - (s - 1)*(1 - x)).
E.g.f. for column n of array A: n*(-W(-x)/(1 - (-W(-x)))^3) - (1 - (1 - x)*exp(x)), with the principal branch of Lambert's W-function

A085283 a(n) = n*n^n - (n-1)*(n-1)^n.

Original entry on oeis.org

1, 1, 7, 65, 781, 11529, 201811, 4085185, 93864121, 2413042577, 68618940391, 2138428376721, 72470493235141, 2653457921150425, 104382202543721467, 4390455017903519489, 196621779843659466481, 9340717969198079777313
Offset: 0

Views

Author

Paul Barry, Jun 26 2003

Keywords

Comments

The system of equations
x(0) = n*x(1) + 1,
(n-1)*x(1) = n*x(2) + 1,
...
(n-1)*x(n) = n*x(n+1) + 1.
relates to the Monkey-And-Coconuts problem and reduces to the single equation
A007778(n-1)*x(0) = A007778(n)*x(n+1) + a(n),
whose solutions {x(0),x(n+1)} are given by {A014293(n), A085606(n)=A007778(n-1) - 1}. - Lekraj Beedassy, Jul 15 2003
For n >= 1, a(n) is equal to the number of functions f: {1,2,...,n+1}->{1,2,...,n} such that Im(f) contains a fixed element. - Aleksandar M. Janjic and Milan Janjic, Feb 27 2007

Crossrefs

Programs

  • Mathematica
    Join[{1},Table[n*n^n-(n-1)(n-1)^n,{n,20}]] (* Harvey P. Dale, Sep 08 2016 *)

Formula

E.g.f.: -(x + 2*x*W(-x) + W(-x)^2)/(W(-x)*(1 + W(-x))^3), where W(x) is the Lambert W function. - Fabian Pereyra, Sep 26 2023
Showing 1-6 of 6 results.