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

A328617 Multiplicative with a(p^e) = p^e, if e = 0 mod p, otherwise a(p^e) = p^((p*floor(e/p)) + A124223(A000720(p),e mod p)).

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 125, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 2401, 250, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 375, 76, 77, 78, 79, 80, 81
Offset: 1

Views

Author

Antti Karttunen, Oct 23 2019

Keywords

Crossrefs

Programs

  • PARI
    A328617(n) = { my(f = factor(n), m, q); for(k=1, #f~, q = (f[k, 2]\f[k, 1]); m = (f[k, 2]%f[k, 1]); if(m, f[k, 2] = q*f[k, 1] + lift(1/Mod(m,f[k, 1])))); factorback(f); };

Formula

For all n >= 0, A276085(a(A276086(n))) = A289234(n).

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

A122585 Reciprocal of n modulo smallest prime greater than n.

Original entry on oeis.org

1, 2, 2, 4, 3, 6, 8, 7, 5, 10, 6, 12, 4, 11, 8, 16, 9, 18, 17, 15, 11, 22, 24, 23, 7, 19, 14, 28, 15, 30, 6, 22, 9, 12, 18, 36, 10, 27, 20, 40, 21, 42, 35, 31, 23, 46, 44, 21, 13, 35, 26, 52, 49, 47, 44, 39, 29, 58, 30, 60, 11, 40, 50, 22, 33, 66, 53, 47, 35, 70, 36, 72, 13, 63, 59
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Maple
    a:= n-> n&^(-1) mod nextprime(n):
    seq(a(n), n=1..100);  # Alois P. Heinz, Apr 13 2023
  • Mathematica
    Table[PowerMod[n,-1,NextPrime[n]],{n,80}] (* Harvey P. Dale, Apr 13 2023 *)
  • Python
    from sympy import nextprime
    def A122585(n): return pow(n,-1,nextprime(n)) # Chai Wah Wu, Apr 13 2023

Formula

From Alois P. Heinz, Apr 13 2023: (Start)
a(n) = n <=> n in { A006093 }.
a(n) = (n+1)/2 <=> n in { A040976 } \ { 0 }. (End)

A124224 Table T(n,k) = reciprocal of k-th number prime to n, modulo n, for 1 <= k <= phi(n).

Original entry on oeis.org

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

Views

Author

Keywords

Comments

T(n,k) = smallest m such that A038566(n,k) * m = 1 (mod n).
For n>1 every row begins with 1 and ends with n-1. T(n,k) = A038566(n,k)^(phi(n) - 1) (mod n). - Geoffrey Critzer, Jan 03 2015

Examples

			The table T(n,k) starts:
n\k 1  2  2  3 4  5 6  7 8  9 10 11
1:  0
2:  1
3:  1  2
4:  1  3
5:  1  3  2  4
6:  1  5
7:  1  4  5  2 3  6
8:  1  3  5  7
9:  1  5  7  2 4  8
10: 1  7  3  9
11: 1  6  4  3 9  2 8  7 5 10
12: 1  5  7 11
13: 1  7  9 10 8 11 2  5 3  4  6 12
14: 1  5  3 11 9 13
15: 1  8  4 13 2 11 7 14
16: 1 11 13  7 9  3 5 15
...
n = 17: 1  9  6 13 7  3  5 15 2 12 14 10 4 11 8 16,
n = 18: 1 11 13  5 7 17,
n = 19: 1 10 13  5 4 16 11 12 17 2 7 8 3 15 14 6 9 18,
n = 20: 1 7 3 9 11 17 13 19.
... reformatted (extended and corrected), - _Wolfdieter Lang_, Oct 06 2016
		

Crossrefs

Cf. A124223, A102057, A038566, A000010 (row lengths), A023896 (row sums after first)

Programs

  • Maple
    0,seq(seq(i^(-1) mod m, i = select(t->igcd(t,m)=1, [$1..m-1])),m=1..100); # Robert Israel, May 18 2014
  • Mathematica
    Table[nn = n; a = Select[Range[nn], CoprimeQ[#, nn] &];
    PowerMod[a, -1, nn], {n, 1, 20}] // Grid (* Geoffrey Critzer, Jan 03 2015 *)

Formula

T(n,k) * A038566(n,k) = 1 (mod n), for n >=1 and k=1..A000010(n). - Wolfdieter Lang, Oct 06 2016

A289251 Triangle T(n, k), n > 0 and 0 <= k < n, read by rows; if gcd(n, k) = 1, then T(n, k) = modular inverse of k (mod n), otherwise T(n, k) = k.

Original entry on oeis.org

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

Views

Author

Rémy Sigrist, Jun 29 2017

Keywords

Comments

The n-th row has n terms, and is a self-inverse permutation of the first n nonnegative numbers.
T(n, 0) = 0 for any n > 0.
T(n, 1) = 1 for any n > 1.
T(n, n-1) = n-1 for any n > 0.
If n > 0 and gcd(n, k) = 1 then T(n, k) = A102057(n, k).
T(prime(n), k) = A124223(n, k) for any n > 0 and k in 1..prime(n)-1.

Examples

			The first rows are:
n\k  0 1 2 3 4 5 6 7 8 9
1    0
2    0 1
3    0 1 2
4    0 1 2 3
5    0 1 3 2 4
6    0 1 2 3 4 5
7    0 1 4 5 2 3 6
8    0 1 2 3 4 5 6 7
9    0 1 5 3 7 2 6 4 8
10   0 1 2 7 4 5 6 3 8 9
		

Crossrefs

Programs

  • Mathematica
    T[n_, k_] := If[GCD[n, k] == 1, PowerMod[k, -1, n], k];
    Table[T[n, k], {n, 1, 13}, {k, 0, n-1}] // Flatten (* Jean-François Alcover, Oct 31 2017 *)
  • PARI
    T(n, k) = if (gcd(n, k)==1, lift(1/Mod(k, n)), k)
Showing 1-5 of 5 results.