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

A006093 a(n) = prime(n) - 1.

Original entry on oeis.org

1, 2, 4, 6, 10, 12, 16, 18, 22, 28, 30, 36, 40, 42, 46, 52, 58, 60, 66, 70, 72, 78, 82, 88, 96, 100, 102, 106, 108, 112, 126, 130, 136, 138, 148, 150, 156, 162, 166, 172, 178, 180, 190, 192, 196, 198, 210, 222, 226, 228, 232, 238, 240, 250, 256, 262, 268, 270
Offset: 1

Views

Author

Keywords

Comments

These are also the numbers that cannot be written as i*j + i + j (i,j >= 1). - Rainer Rosenthal, Jun 24 2001; Henry Bottomley, Jul 06 2002
The values of k for which Sum_{j=0..n} (-1)^j*binomial(k, j)*binomial(k-1-j, n-j)/(j+1) produces an integer for all n such that n < k. Setting k=10 yields [0, 1, 4, 11, 19, 23, 19, 11, 4, 1, 0] for n = [-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9], so 10 is in the sequence. Setting k=3 yields [0, 1, 1/2, 1/2] for n = [-1, 0, 1, 2], so 3 is not in the sequence. - Dug Eichelberger (dug(AT)mit.edu), May 14 2001
n such that x^n + x^(n-1) + x^(n-2) + ... + x + 1 is irreducible. - Robert G. Wilson v, Jun 22 2002
Records for Euler totient function phi.
Together with 0, n such that (n+1) divides (n!+1). - Benoit Cloitre, Aug 20 2002; corrected by Charles R Greathouse IV, Apr 20 2010
n such that phi(n^2) = phi(n^2 + n). - Jon Perry, Feb 19 2004
Numbers having only the trivial perfect partition consisting of a(n) 1's. - Lekraj Beedassy, Jul 23 2006
Numbers n such that the sequence {binomial coefficient C(k,n), k >= n } contains exactly one prime. - Artur Jasinski, Dec 02 2007
Record values of A143201: a(n) = A143201(A001747(n+1)) for n > 1. - Reinhard Zumkeller, Aug 12 2008
From Reinhard Zumkeller, Jul 10 2009: (Start)
The first N terms can be generated by the following sieving process:
start with {1, 2, 3, 4, ..., N - 1, N};
for i := 1 until SQRT(N) do
(if (i is not striked out) then
(for j := 2 * i + 1 step i + 1 until N do
(strike j from the list)));
remaining numbers = {a(n): a(n) <= N}. (End)
a(n) = partial sums of A075526(n-1) = Sum_{1..n} A075526(n-1) = Sum_{1..n} (A008578(n+1) - A008578(n)) = Sum_{1..n} (A158611(n+2) - A158611(n+1)) for n >= 1. - Jaroslav Krizek, Aug 04 2009
A171400(a(n)) = 1 for n <> 2: subsequence of A171401, except for a(2) = 2. - Reinhard Zumkeller, Dec 08 2009
Numerator of (1 - 1/prime(n)). - Juri-Stepan Gerasimov, Jun 05 2010
Numbers n such that A002322(n+1) = n. This statement is stronger than repeating the property of the entries in A002322, because it also says in reciprocity that this sequence here contains no numbers beyond the Carmichael numbers with that property. - Michel Lagneau, Dec 12 2010
a(n) = A192134(A095874(A000040(n))); subsequence of A192133. - Reinhard Zumkeller, Jun 26 2011
prime(a(n)) + prime(k) < prime(a(k) + k) for at least one k <= a(n): A212210(a(n),k) < 0. - Reinhard Zumkeller, May 05 2012
Except for the first term, numbers n such that the sum of first n natural numbers does not divide the product of first n natural numbers; that is, n*(n + 1)/2 does not divide n!. - Jayanta Basu, Apr 24 2013
BigOmega(a(n)) equals BigOmega(a(n)*(a(n) + 1)/2), where BigOmega = A001222. Rationale: BigOmega of the product on the right hand side factorizes as BigOmega(a/2) + Bigomega(a+1) = BigOmega(a/2) + 1 because a/2 and a + 1 are coprime, because BigOmega is additive, and because a + 1 is prime. Furthermore Bigomega(a/2) = Bigomega(a) - 1 because essentially all 'a' are even. - Irina Gerasimova, Jun 06 2013
Record values of A060681. - Omar E. Pol, Oct 26 2013
Deficiency of n-th prime. - Omar E. Pol, Jan 30 2014
Conjecture: All the sums Sum_{k=s..t} 1/a(k) with 1 <= s <= t are pairwise distinct. In general, for any integers d >= -1 and m > 0, if Sum_{k=i..j} 1/(prime(k)+d)^m = Sum_{k=s..t} 1/(prime(k)+d)^m with 0 < i <= j and 0 < s <= t then we must have (i,j) = (s,t), unless d = m = 1 and {(i,j),(s,t)} = {(4,4),(8,10)} or {(4,7),(5,10)}. (Note that 1/(prime(8)+1)+1/(prime(9)+1)+1/(prime(10)+1) = 1/(prime(4)+1) and Sum_{k=5..10} 1/(prime(k)+1) = 1/(prime(4)+1) + Sum_{k=5..7} 1/(prime(k)+1).) - Zhi-Wei Sun, Sep 09 2015
Numbers n such that (prime(i)^n + n) is divisible by (n+1), for all i >= 1, except when prime(i) = n+1. - Richard R. Forberg, Aug 11 2016
a(n) is the period of Fubini numbers (A000670) over the n-th prime. - Federico Provvedi, Nov 28 2020

References

  • Archimedeans Problems Drive, Eureka, 40 (1979), 28.
  • Harvey Dubner, Generalized Fermat primes, J. Recreational Math., 18 (1985): 279-280.
  • M. Gardner, The Colossal Book of Mathematics, pp. 31, W. W. Norton & Co., NY, 2001.
  • M. Gardner, Mathematical Circus, pp. 251-2, Alfred A. Knopf, NY, 1979.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

a(n) = K(n, 1) and A034693(K(n, 1)) = 1 for all n. The subscript n refers to this sequence and K(n, 1) is the index in A034693. - Labos Elemer
Cf. A000040, A034694. Different from A075728.
Complement of A072668 (composite numbers minus 1), A072670(a(n))=0.
Essentially the same as A039915.
Cf. A101301 (partial sums), A005867 (partial products).
Column 1 of the following arrays/triangles: A087738, A249741, A352707, A378979, A379010.
The last diagonal of A162619, and of A174996, the first diagonal in A131424.
Row lengths of irregular triangles A086145, A124223, A212157.

Programs

Formula

a(n) = (p-1)! mod p where p is the n-th prime, by Wilson's theorem. - Jonathan Sondow, Jul 13 2010
a(n) = A000010(prime(n)) = A000010(A006005(n)). - Antti Karttunen, Dec 16 2012
a(n) = A005867(n+1)/A005867(n). - Eric Desbiaux, May 07 2013
a(n) = A000040(n) - 1. - Omar E. Pol, Oct 26 2013
a(n) = A033879(A000040(n)). - Omar E. Pol, Jan 30 2014

Extensions

Correction for change of offset in A158611 and A008578 in Aug 2009 Jaroslav Krizek, Jan 27 2010
Obfuscating comments removed by Joerg Arndt, Mar 11 2010
Edited by Charles R Greathouse IV, Apr 20 2010

A246278 Prime shift array: Square array read by antidiagonals: A(1,col) = 2*col, and for row > 1, A(row,col) = A003961(A(row-1,col)).

Original entry on oeis.org

2, 4, 3, 6, 9, 5, 8, 15, 25, 7, 10, 27, 35, 49, 11, 12, 21, 125, 77, 121, 13, 14, 45, 55, 343, 143, 169, 17, 16, 33, 175, 91, 1331, 221, 289, 19, 18, 81, 65, 539, 187, 2197, 323, 361, 23, 20, 75, 625, 119, 1573, 247, 4913, 437, 529, 29, 22, 63, 245, 2401, 209, 2873, 391, 6859, 667, 841, 31
Offset: 2

Views

Author

Antti Karttunen, Aug 21 2014

Keywords

Comments

The array is read by antidiagonals: A(1,1), A(1,2), A(2,1), A(1,3), A(2,2), A(3,1), etc.
This array can be obtained by taking every second column from array A242378, starting from its column 2.
Permutation of natural numbers larger than 1.
The terms on row n are all divisible by n-th prime, A000040(n).
Each column is strictly growing, and the terms in the same column have the same prime signature.
A055396(n) gives the row number of row where n occurs,
and A246277(n) gives its column number, both starting from 1.
From Antti Karttunen, Jan 03 2015: (Start)
A252759(n) gives their sum minus one, i.e. the Manhattan distance of n from the top left corner.
If we assume here that a(1) = 1 (but which is not explicitly included because outside of the array), then A252752 gives the inverse permutation. See also A246276.
(End)

Examples

			The top left corner of the array:
   2,     4,     6,     8,    10,    12,    14,    16,    18, ...
   3,     9,    15,    27,    21,    45,    33,    81,    75, ...
   5,    25,    35,   125,    55,   175,    65,   625,   245, ...
   7,    49,    77,   343,    91,   539,   119,  2401,   847, ...
  11,   121,   143,  1331,   187,  1573,   209, 14641,  1859, ...
  13,   169,   221,  2197,   247,  2873,   299, 28561,  3757, ...
		

Crossrefs

First row: A005843 (the even numbers), from 2 onward.
Row 2: A249734, Row 3: A249827.
Column 1: A000040 (primes), Column 2: A001248 (squares of primes), Column 3: A006094 (products of two successive primes), Column 4: A030078 (cubes of primes).
Transpose: A246279.
Inverse permutation: A252752.
One more than A246275.
Arrays obtained by applying a particular function (given in parentheses) to the entries of this array. Cases where the columns grow monotonically are indicated with *: A249822 (A078898), A253551 (* A156552), A253561 (* A122111), A341605 (A017665), A341606 (A017666), A341607 (A006530 o A017666), A341608 (A341524), A341626 (A341526), A341627 (A341527), A341628 (A006530 o A341527), A342674 (A341530), A344027 (* A003415, arithmetic derivative), A355924 (A342671), A355925 (A009194), A355926 (A355442), A355927 (* sigma), A356155 (* A258851), A372562 (A252748), A372563 (A286385), A378979 (* deficiency, A033879), A379008 (* (probably), A294898), A379010 (* A000010, Euler phi), A379011 (* A083254).
Cf. A329050 (subtable).

Programs

  • Mathematica
    f[p_?PrimeQ] := f[p] = Prime[PrimePi@ p + 1]; f[1] = 1; f[n_] := f[n] = Times @@ (f[First@ #]^Last@ # &) /@ FactorInteger@ n; Block[{lim = 12}, Table[#[[n - k, k]], {n, 2, lim}, {k, n - 1, 1, -1}] &@ NestList[Map[f, #] &, Table[2 k, {k, lim}], lim]] // Flatten (* Michael De Vlieger, Jan 04 2016, after Jean-François Alcover at A003961 *)
  • Scheme
    (define (A246278 n) (if (<= n 1) n (A246278bi (A002260 (- n 1)) (A004736 (- n 1))))) ;; Square array starts with offset=2, and we have also tacitly defined a(1) = 1 here.
    (define (A246278bi row col) (if (= 1 row) (* 2 col) (A003961 (A246278bi (- row 1) col))))

Formula

A(1,col) = 2*col, and for row > 1, A(row,col) = A003961(A(row-1,col)).
As a composition of other similar sequences:
a(n) = A122111(A253561(n)).
a(n) = A249818(A083221(n)).
For all n >= 1, a(n+1) = A005940(1+A253551(n)).
A(n, k) = A341606(n, k) * A355925(n, k). - Antti Karttunen, Jul 22 2022

Extensions

Starting offset of the linear sequence changed from 1 to 2, without affecting the column and row indices by Antti Karttunen, Jan 03 2015

A379011 Square array A(n, k) = 2*phi(A246278(n, k)) - A246278(n, k), read by falling antidiagonals; A083254, (2*phi(n)-n), applied to the prime shift array.

Original entry on oeis.org

0, 0, 1, -2, 3, 3, 0, 1, 15, 5, -2, 9, 13, 35, 9, -4, 3, 75, 43, 99, 11, -2, 3, 25, 245, 97, 143, 15, 0, 7, 65, 53, 1089, 163, 255, 17, -6, 27, 31, 301, 133, 1859, 253, 323, 21, -4, 5, 375, 73, 1067, 185, 4335, 355, 483, 27, -2, 9, 91, 1715, 151, 2119, 313, 6137, 565, 783, 29, -8, 9, 125, 473, 11979, 229, 4301, 457, 11109, 781, 899, 35
Offset: 1

Views

Author

Antti Karttunen, Dec 14 2024

Keywords

Comments

Each column is strictly increasing.

Examples

			The top left corner of the array:
k=  |  1    2    3      4    5      6    7       8      9     10   11      12
2k= |  2    4    6      8   10     12   14      16     18     20   22      24
----+-------------------------------------------------------------------------
  1 |  0,   0,  -2,     0,  -2,    -4,  -2,      0,    -6,    -4,  -2,     -8,
  2 |  1,   3,   1,     9,   3,     3,   7,     27,     5,     9,   9,      9,
  3 |  3,  15,  13,    75,  25,    65,  31,    375,    91,   125,  43,    325,
  4 |  5,  35,  43,   245,  53,   301,  73,   1715,   473,   371,  83,   2107,
  5 |  9,  99,  97,  1089, 133,  1067, 151,  11979,  1261,  1463, 187,  11737,
  6 | 11, 143, 163,  1859, 185,  2119, 229,  24167,  2771,  2405, 295,  27547,
  7 | 15, 255, 253,  4335, 313,  4301, 403,  73695,  4807,  5321, 433,  73117,
  8 | 17, 323, 355,  6137, 457,  6745, 491, 116603,  8165,  8683, 593, 128155,
  9 | 21, 483, 565, 11109, 607, 12995, 733, 255507, 16385, 13961, 817, 298885,
		

Crossrefs

Cf. A040976 (column 1), A378986 (row 1).
Cf. also A378979.

Programs

  • PARI
    up_to = 11325; \\ = binomial(150+1,2)
    A083254(n) = (2*eulerphi(n)-n);
    A246278sq(row,col) = if(1==row,2*col, my(f = factor(2*col)); for(i=1, #f~, f[i,1] = prime(primepi(f[i,1])+(row-1))); factorback(f));
    A379011sq(row,col) = A083254(A246278sq(row,col));
    A379011list(up_to) = { my(v = vector(up_to), i=0); for(a=1,oo, for(col=1,a, i++; if(i > up_to, return(v)); v[i] = A379011sq(col,(a-(col-1))))); (v); };
    v379011 = A379011list(up_to);
    A379011(n) = v379011[n];

Formula

A(n, k) = 2*A379010(n, k) - A246278(n, k).

A379008 Square array A(n, k) = A294898(A246278(n, k)), read by falling antidiagonals; Difference A005187(n)-A000203(n) applied to the prime shift array.

Original entry on oeis.org

0, 0, 0, -2, 3, 2, 0, 2, 16, 3, 0, 10, 19, 38, 7, -6, 7, 88, 54, 104, 9, 1, 8, 33, 280, 113, 151, 14, 0, 16, 96, 65, 1192, 184, 268, 15, -5, 38, 44, 389, 152, 2009, 282, 336, 18, -4, 22, 464, 88, 1279, 207, 4600, 388, 502, 24, 5, 16, 142, 1996, 174, 2445, 345, 6470, 608, 806, 25, -14, 18, 174, 623, 13170, 257, 4834, 497, 11605, 833, 924, 33
Offset: 1

Views

Author

Antti Karttunen, Dec 14 2024

Keywords

Comments

Question: Are all columns increasing, and strictly increasing after the leftmost column?

Examples

			The top left corner of the array:
k=  |  1    2    3      4    5      6    7       8      9     10   11      12
2k= |  2    4    6      8   10     12   14      16     18     20   22      24
----+-------------------------------------------------------------------------
1   |  0,   0,  -2,     0,   0,    -6,   1,      0,    -5,    -4,   5,    -14,
2   |  0,   3,   2,    10,   7,     8,  16,     38,    22,    16,  18,     26,
3   |  2,  16,  19,    88,  33,    96,  44,    464,   142,   174,  58,    495,
4   |  3,  38,  54,   280,  65,   389,  88,   1996,   623,   469, 103,   2737,
5   |  7, 104, 113,  1192, 152,  1279, 174,  13170,  1516,  1717, 211,  14102,
6   |  9, 151, 184,  2009, 207,  2445, 257,  26172,  3208,  2756, 328,  31850,
7   | 14, 268, 282,  4600, 345,  4834, 439,  78295,  5406,  5916, 473,  82285,
8   | 15, 336, 388,  6470, 497,  7455, 533, 123071,  9035,  9501, 638, 141745,
9   | 18, 502, 608, 11605, 653, 14081, 784, 267115, 17773, 15097, 870, 324077,
Here 0's occur also after the first row. For example column 30, which corresponds with numbers 60, 315, 1925, 7007, 26741, ..., begins as -52, 0, 868, 4428, 19958, etc. See also A295296.
		

Crossrefs

Cf. A080085 (column 1, incremented by one).
Cf. also array A378979, and A324348 (another permutation of A294898).

Programs

  • PARI
    up_to = 11325; \\ = binomial(150+1,2)
    A005187(n) = { my(s=n); while(n>>=1, s+=n); s; };
    A294898(n) = (A005187(n)-sigma(n));
    A246278sq(row,col) = if(1==row,2*col, my(f = factor(2*col)); for(i=1, #f~, f[i,1] = prime(primepi(f[i,1])+(row-1))); factorback(f));
    A379008sq(row,col) = A294898(A246278sq(row,col));
    A379008list(up_to) = { my(v = vector(up_to), i=0); for(a=1,oo, for(col=1,a, i++; if(i > up_to, return(v)); v[i] = A379008sq(col,(a-(col-1))))); (v); };
    v379008 = A379008list(up_to);
    A379008(n) = v379008[n];

A306190 a(n) = p^2 - p - 1 where p = prime(n), the n-th prime.

Original entry on oeis.org

1, 5, 19, 41, 109, 155, 271, 341, 505, 811, 929, 1331, 1639, 1805, 2161, 2755, 3421, 3659, 4421, 4969, 5255, 6161, 6805, 7831, 9311, 10099, 10505, 11341, 11771, 12655, 16001, 17029, 18631, 19181, 22051, 22649, 24491, 26405, 27721, 29755, 31861, 32579, 36289
Offset: 1

Views

Author

Kritsada Moomuang, Jan 28 2019

Keywords

Comments

Terms are divisible by 5 iff p is of the form 10*m + 3 (A030431).

Examples

			a(3) = 19 because 5^2 - 5 - 1 = 19.
		

Crossrefs

Supersequence of A091568.
Subsequence of A028387 or A165900.
Second column of A378979.
A039914 is an essentially identical sequence.

Programs

  • Maple
    map(p -> p^2-p-1, [seq(ithprime(i),i=1..100)]); # Robert Israel, Mar 11 2019
  • Mathematica
    Table[Prime[n]^2-Prime[n]-1, {n, 1, 100}] (* Jinyuan Wang, Feb 02 2019 *)
  • PARI
    a(n) = {p=prime(n);p^2-p-1;} \\ Jinyuan Wang, Feb 02 2019

Formula

a(n) = A036689(n) - 1.
a(n) = A036690(n) - A072055(n).
a(n) = A060800(n) - A089241(n).
From Amiram Eldar, Nov 07 2022: (Start)
Product_{n>=1} (1 + 1/a(n)) = A065488.
Product_{n>=2} (1 - 1/a(n)) = A065479. (End)
a(n) = A033879(A001248(n)). [Deficiency of squares of primes] - Antti Karttunen, Dec 13 2024

A378978 Deficiency of even numbers: a(n) = 4*n - sigma(2*n).

Original entry on oeis.org

1, 1, 0, 1, 2, -4, 4, 1, -3, -2, 8, -12, 10, 0, -12, 1, 14, -19, 16, -10, -12, 4, 20, -28, 7, 6, -12, -8, 26, -48, 28, 1, -12, 10, -4, -51, 34, 12, -12, -26, 38, -56, 40, -4, -54, 16, 44, -60, 25, -17, -12, -2, 50, -64, 4, -24, -12, 22, 56, -120, 58, 24, -60, 1, 8, -72, 64, 2, -12, -56, 68, -115, 70, 30, -72, 4, 20
Offset: 1

Views

Author

Antti Karttunen, Dec 13 2024

Keywords

Crossrefs

Even bisection of A033879.
Topmost row of A378979.
Cf. also A344587, A377879.

Programs

Formula

a(n) = A033879(2*n) = 4*n - A062731(n).

A378985 Number of iterations of x -> A003961(x) needed before the result is deficient, when starting from x = 2*n.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Dec 13 2024

Keywords

Comments

This grows slowly. See comments in A336835.

Crossrefs

Even bisection of A336835.
Cf. arrays A341605, A378979.

Programs

  • PARI
    A003961(n) = my(f = factor(n)); for (i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); factorback(f); \\ From A003961
    A336835(n) = { my(i=0); while(sigma(n) >= (n+n), i++; n = A003961(n)); (i); };
    A378985(n) = A336835(2*n);

Formula

a(n) = A336835(2*n).
Showing 1-7 of 7 results.