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

A061026 Smallest number m such that phi(m) is divisible by n, where phi = Euler totient function A000010.

Original entry on oeis.org

1, 3, 7, 5, 11, 7, 29, 15, 19, 11, 23, 13, 53, 29, 31, 17, 103, 19, 191, 25, 43, 23, 47, 35, 101, 53, 81, 29, 59, 31, 311, 51, 67, 103, 71, 37, 149, 191, 79, 41, 83, 43, 173, 69, 181, 47, 283, 65, 197, 101, 103, 53, 107, 81, 121, 87, 229, 59, 709, 61, 367, 311, 127, 85
Offset: 1

Views

Author

Melvin J. Knight (knightmj(AT)juno.com), May 25 2001

Keywords

Comments

Conjecture: a(n) is odd for all n. Verified up to n <= 3*10^5. - Jianing Song, Feb 21 2021
The conjecture above is false because a(16842752) = 33817088; see A002181 and A143510. - Flávio V. Fernandes, Oct 08 2023

Examples

			a(48) = 65 because phi(65) = phi(5)*phi(13) = 4*12 = 48 and no smaller integer m has phi(m) divisible by 48.
		

Crossrefs

Cf. A233516, A233517 (records).
Cf. A005179 (analog for number of divisors), A070982 (analog for sum of divisors).

Programs

  • Mathematica
    a = ConstantArray[1, 64]; k = 1; While[Length[vac = Rest[Flatten[Position[a, 1]]]] > 0, k++; a[[Intersection[Divisors[EulerPhi[k]], vac]]] *= k]; a  (* Ivan Neretin, May 15 2015 *)
  • PARI
    a(n) = my(s=1); while(eulerphi(s)%n, s++); s;
    vector(100, n, a(n))
    
  • Python
    from sympy import totient as phi
    def a(n):
      k = 1
      while phi(k)%n != 0: k += 1
      return k
    print([a(n) for n in range(1, 65)]) # Michael S. Branicky, Feb 21 2021

Formula

Sequence is unbounded; a(n) <= n^2 since phi(n^2) is always divisible by n.
If n+1 is prime then a(n) = n+1.
a(n) = min{ k : phi(k) == 0 (mod n) }.
a(n) = a(2n) for odd n > 1. - Jianing Song, Feb 21 2021

A265647 Smallest k such that n divides k*(k+1)*(k+2)/6.

Original entry on oeis.org

1, 2, 7, 2, 3, 7, 5, 6, 25, 3, 9, 7, 11, 6, 8, 14, 15, 26, 17, 4, 7, 10, 21, 8, 23, 11, 79, 6, 27, 8, 29, 30, 9, 15, 5, 26, 35, 18, 25, 8, 39, 7, 41, 10, 25, 22, 45, 16, 47, 23, 16, 12, 51, 79, 9, 6, 17, 27, 57, 8, 59, 30, 26, 62, 13, 43, 65, 15, 44, 14, 69, 54, 71, 35, 25, 18, 20, 26, 77, 14, 241
Offset: 1

Views

Author

Ctibor O. Zizka, Dec 11 2015

Keywords

Comments

More generally we can ask for the smallest k such that gcd(n,f(k)) = n. This sequence has f(k) = k*(k+1)*(k+2)/6. For other examples in the OEIS, see the crossrefencess.

Crossrefs

Programs

  • Mathematica
    Table[k = 1; While[! Divisible[k (k + 1) (k + 2)/6, n], k++]; k, {n, 81}] (* Michael De Vlieger, Dec 11 2015 *)
  • PARI
    a(n)=my(k=1);while((k*(k+1)*(k+2)/6)%n>0,k++);k \\ Anders Hellström, Dec 11 2015
    
  • PARI
    first(n) = { my(todo = n, i = 1, res = vector(n)); while(todo > 0, d = select(x -> x <= n, divisors(binomial(i + 2, 3))); for(j = 1, #d, if(res[d[j]] == 0, res[d[j]] = i; todo-- ) ); i++ ); res } \\ David A. Corneth, Mar 22 2021

Extensions

More terms from Michael De Vlieger, Dec 11 2015

A319068 a(n) is the greatest k such that A000203(k) divides n where A000203 is the sum of divisors of n.

Original entry on oeis.org

1, 1, 2, 3, 1, 5, 4, 7, 2, 1, 1, 11, 9, 13, 8, 7, 1, 17, 1, 19, 4, 1, 1, 23, 1, 9, 2, 13, 1, 29, 25, 31, 2, 1, 4, 22, 1, 37, 18, 27, 1, 41, 1, 43, 8, 1, 1, 47, 4, 1, 2, 9, 1, 53, 1, 39, 49, 1, 1, 59, 1, 61, 32, 31, 9, 5, 1, 67, 2, 13, 1, 71, 1, 73, 8, 37, 4, 45, 1, 79
Offset: 1

Views

Author

Michel Marcus, Sep 09 2018

Keywords

Comments

Sándor names this function the sum-of-divisors maximum function and remarks that this function is well-defined, since a(n) can be at least 1, and cannot be greater than n.

Crossrefs

Cf. A000203 (sigma), A070982 (the sum of divisors minimum function).
Right border of A378912.

Programs

  • Mathematica
    A319068[n_] := Module[{k = n}, While[!Divisible[n, DivisorSigma[1, k]], k--]; k];
    Array[A319068, 100] (* Paolo Xausa, Dec 11 2024 *)
  • PARI
    a(n) = {forstep (k=n, 1, -1, if ((n % sigma(k)) == 0, return (k)););}
    
  • PARI
    a(n) = {my(d = divisors(n)); vecmax(vector(#d, i, invsigmaMax(d[i])));} \\ Amiram Eldar, Nov 29 2024, using Max Alekseyev's invphi.gp

Formula

a(p+1) = p, for p prime. See Sándor Theorem 2 p. 4.

A233929 Smallest x such that sigma(x) == n-1 (mod n).

Original entry on oeis.org

1, 1, 7, 2, 3, 2401, 5, 4, 7, 18, 21, 9604, 6, 9, 13, 8, 44, 21609, 10, 18, 19, 289, 36, 9604, 14, 162, 57, 72, 12, 2614689, 29, 16, 21, 625, 63, 38416, 22, 4608, 37, 18, 27, 21609, 20, 289, 43, 36, 50, 38416, 33, 196, 111, 162, 157, 28561, 34, 1296, 28, 49
Offset: 1

Views

Author

Michel Marcus, Dec 18 2013

Keywords

Comments

Right subdiagonal of A074625.
Records values are: 1, 7, 2401, 9604, 21609, 2614689, 21215236, 36324729, 53304601, 338964921, 431642176, 528264256, 1307979556, ... obtained at indices: 1, 3, 6, 12, 18, 30, 60, 210, 288, 384, 534, 630, 732. - Michel Marcus, Dec 22 2013

Crossrefs

Programs

  • PARI
    a(n) = {x = 1; while ((sigma(x) % n) != (n - 1), x++); x;} \\ Michel Marcus, Dec 18 2013

A085961 Sigma of the least numbers k for which sigma is divisible by k (where sigma is the sum of the divisors of k, A000203(k)).

Original entry on oeis.org

1, 4, 3, 4, 15, 6, 7, 8, 18, 20, 44, 12, 13, 28, 15, 32, 68, 18, 38, 20, 42, 44, 138, 24, 150, 78, 54, 28, 174, 60, 31, 32, 132, 68, 140, 36, 74, 38, 39, 40, 164, 42, 258, 44, 90, 138, 282, 48, 98, 150, 102, 104, 212, 54, 110, 56, 57, 174, 354, 60, 183, 124, 63, 128, 195
Offset: 1

Views

Author

Yuval Dekel (dekelyuval(AT)hotmail.com), Aug 17 2003

Keywords

Crossrefs

Formula

a(n) = A000203(A070982(n)).

Extensions

More terms from John W. Layman, Aug 19 2003

A074208 Least k > 1 such that n divides sigma(k) - k.

Original entry on oeis.org

2, 6, 4, 9, 14, 6, 8, 10, 15, 14, 20, 24, 27, 22, 16, 12, 39, 24, 48, 34, 18, 20, 52, 90, 40, 46, 42, 28, 68, 78, 32, 56, 45, 62, 84, 24, 70, 48, 66, 44, 63, 30, 50, 82, 78, 52, 116, 90, 75, 40, 132, 96, 80, 42, 36, 106, 99, 68, 148, 120, 130, 118, 64, 56, 117, 54, 136, 112
Offset: 1

Views

Author

Benoit Cloitre, Sep 17 2002

Keywords

Crossrefs

Cf. A070982.

Programs

  • Mathematica
    a = ConstantArray[1, 68]; k = 1; While[Length[vac = Flatten[Position[a, 1]]] > 0, k++; a[[Intersection[Divisors[DivisorSigma[1, k] - k], vac]]] *= k]; a (* Ivan Neretin, May 15 2015 *)
    lk[n_]:=Module[{k=2},While[!Divisible[DivisorSigma[1,k]-k,n],k++];k]; Array[lk,70] (* Harvey P. Dale, Oct 23 2017 *)
  • PARI
    a(n)=if(n<0,0,s=2; while((sigma(s)-s)%n>0,s++); s)
    
  • PARI
    first(n)=my(res = vector(n), todo = n - 1, k = 2); res[1] = 2; while(todo > 0, d = divisors(sigma(k) - k); for(i=2, #d, if(d[i] <= n && res[d[i]] == 0, res[d[i]] = k; todo--)); k++); res \\ David A. Corneth, Oct 23 2017

Formula

Conjecture: Sum_{k=1..n} a(k) = O(n^{2+epsilon}) for any epsilon > 0.
Between n = 90000 and 100000, Sum_{k=1..n} a(k)/n^2 slowly but not monotonically increases from 1.0007 to 1.0023. At n = 10^6, it's about 1.0147. - David A. Corneth, Oct 23 2017

A319067 a(n) is the least k such that n divides A047994(k) where A047994 is the unitary totient function.

Original entry on oeis.org

1, 3, 4, 5, 11, 7, 8, 9, 19, 11, 23, 13, 27, 24, 16, 17, 103, 19, 191, 33, 43, 23, 47, 25, 101, 27, 76, 29, 59, 31, 32, 45, 67, 103, 71, 37, 149, 191, 79, 41, 83, 43, 173, 69, 112, 47, 283, 49, 197, 101, 103, 53, 107, 76, 253, 72, 229, 59, 709, 61, 367, 96, 64, 85, 131
Offset: 1

Views

Author

Michel Marcus, Sep 09 2018

Keywords

Crossrefs

Cf. A047994 (unitary totient).
Cf. A005179 (analog for number of divisors), A061026 (analog for Euler totient), A070982 (analog for sum of divisors).

Programs

  • PARI
    a047994(n) = prod(i=1, #n=factor(n)~, n[1, i]^n[2, i]-1);
    a(n) = my(k=1); while(a047994(k) % n, k++); k;

Formula

a(p-1) = p for p prime. See Sándor link Theorem 2 p. 95.

A283495 Smallest k such that there is a number whose divisors sum to k*n.

Original entry on oeis.org

1, 2, 1, 1, 3, 1, 1, 1, 2, 2, 4, 1, 1, 2, 1, 2, 4, 1, 2, 1, 2, 2, 6, 1, 6, 3, 2, 1, 6, 2, 1, 1, 4, 2, 4, 1, 2, 1, 1, 1, 4, 1, 6, 1, 2, 3, 6, 1, 2, 3, 2, 2, 4, 1, 2, 1, 1, 3, 6, 1, 3, 2, 1, 2, 3, 2, 6, 1, 2, 2, 4, 1, 7, 1, 2, 2, 4, 1, 2, 1, 2, 2, 4, 1, 3, 3, 2, 2, 23, 1, 1, 4, 1, 3, 6, 1
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Mar 08 2017

Keywords

Comments

Smallest k >=1 such that (number of numbers whose divisor sum to k*n) = m:
m \n| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |
---------------------------------------------------------------------------
0 | 2 | 1 | 3 | 4 | 1 | 11 | 3 | 2 | 1 | 1 | 1 | 23 |
1 | 1 | 2 | 1 | 1 | 3 | 1 | 1 | 1 | 2 | 2 | 4 | 3 |
2 | 12 | 6 | 4 | 3 | 16 | 2 | 8 | 4 | 2 | 8 | 12 | 1 |
3 | 24 | 12 | 8 | 6 | 12 | 4 | 6 | 3 | 10 | 6 | ...| |
...

Examples

			a(2) = 2 because (number of numbers whose divisor sum to 2*2) = 1.
		

Crossrefs

Cf. A007369 (numbers n such that a(n) > 1).

Programs

  • PARI
    a(n)=my(k=oo,m,t); while(mCharles R Greathouse IV, Mar 09 2017

Extensions

Corrected by Charles R Greathouse IV, Mar 09 2017

A283625 Smallest k such that 2n - 1 divides sigma(k^2), or 0 if no such k exists.

Original entry on oeis.org

1, 7, 121, 2, 91, 9, 3, 847, 12667700813876161, 7, 14, 32, 116281, 1729, 343, 4, 63, 242, 47, 21, 1369, 79, 11011, 2048, 22, 88673905697133127, 4826809, 961, 7, 4782969, 13, 182, 363, 29, 224, 25, 16, 813967, 18, 23, 53599, 3486784401, 1532791798479015481, 4459
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Mar 12 2017

Keywords

Examples

			a(3)=121 because 3*2 - 1 = 5 divides sigma(121^2) = 16105, and sigma(n^2) is not divisible by 5 for n < 121.
		

Crossrefs

Programs

  • PARI
    a(n) = my(k = 1); while(1,if(sigma(k^2)%(2*n - 1)==0, return(k), k+=1)); \\ Indranil Ghosh, Mar 13 2017

Extensions

a(9), a(26), a(42)-a(44) from Giovanni Resta, Mar 12 2017
Showing 1-9 of 9 results.