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.

User: Carlos Eduardo Olivieri

Carlos Eduardo Olivieri's wiki page.

Carlos Eduardo Olivieri has authored 21 sequences. Here are the ten most recent ones:

A273323 a(n) = greatest number k <= n^2 having exactly n divisors, or 0 if no such k exists.

Original entry on oeis.org

1, 3, 9, 15, 16, 32, 0, 56, 36, 80, 0, 140, 0, 192, 144, 216, 0, 300, 0, 336, 0, 0, 0, 540, 0, 0, 0, 0, 0, 720, 0, 840, 0, 0, 0, 1260, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
Offset: 1

Author

Keywords

Comments

The sequence is zero for n>36, since A005179(n) > n^2 for all n > 36.

Examples

			a(4) = 15, because 15 is the greatest number <= 4^2 with exactly 4 divisors.
		

Crossrefs

Programs

  • Mathematica
    Seq := {}; For[n = 1, n < 50, n++, AppendTo[Seq, a = Max[Select[Range[n^2], DivisorSigma[0, #] == n &]]; If[a == -Infinity, 0, a]]]; Seq

A264786 Let { d_1, d_2, ..., d_k } be the divisors of n. Then a(n) = d_k^1 + d_(k-1)^2 + ... + d_1^k.

Original entry on oeis.org

1, 3, 4, 9, 6, 24, 8, 33, 19, 44, 12, 226, 14, 72, 68, 161, 18, 429, 20, 534, 98, 152, 24, 3858, 51, 204, 136, 856, 30, 6534, 32, 1089, 182, 332, 210, 22965, 38, 408, 236, 12886, 42, 14262, 44, 2148, 1868, 584, 48, 128338, 99, 2333, 368, 3214, 54, 21810, 302
Offset: 1

Author

Keywords

Examples

			For n = 4: a(4) = 4^1 + 2^2 + 1^3 = 9.
For n = 5: a(5) = 5^1 + 1^2 = 6.
For n = 6: a(6) = 6^1 + 3^2 + 2^3 + 1^4 = 24.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Sum[Sort[Divisors[n], #1 > #2 &][[i]]^i, {i, DivisorSigma[0, n]}]; Table[a[n], {n, 60}]
  • PARI
    a(n) = my(d = divisors(n)); sum(k=1, #d, d[k]^(#d-k+1)); \\ Michel Marcus, Jan 01 2016

A261256 Let S_k denote the sequence of numbers j such that A001222(j) - A001221(j) = k. Then a(n) is the n-th term of S_n.

Original entry on oeis.org

4, 24, 72, 160, 432, 896, 2592, 5632, 12800, 26624, 61440, 124416, 278528, 622592, 1376256, 2949120, 5971968, 12058624, 25690112, 60817408, 130023424, 262144000, 528482304, 1107296256, 2264924160, 4586471424, 9395240960, 19864223744, 40265318400, 83751862272
Offset: 1

Author

Keywords

Comments

S_0 would correspond to the squarefree numbers (A005117), that is, numbers j such that A001222(j) = A001221(j). Note that S_0 is excluded from the scheme. - Michel Marcus, Sep 21 2015

Examples

			For n = 1, S_1 = {4, 9, 12, 18, 20, 25, ...}, so a(1) = S_1(1) = 4.
For n = 2, S_2 = {8, 24, 27, 36, 40, 54, ...}, so a(2) = S_2(2) = 24.
For n = 3, S_3 = {16, 48, 72, 80, 81, 108, ...}, so a(3) = S_3(3) = 72.
For n = 4, S_4 = {32, 96, 144, 160, 216, 224, ...}, so a(4) = S_4(4) = 160.
For n = 5, S_5 = {64, 192, 288, 320, 432, 448, ...}, so a(5) = S_5(5) = 432.
		

Programs

  • Haskell
    a261256 n = a257851 n (n - 1)  -- Reinhard Zumkeller, Nov 29 2015
  • Mathematica
    OutSeq = {}; For[i = 1, i <= 16, i++, l = Select[Range[10^2*2^i], PrimeOmega[#] - PrimeNu[#] == i &]; AppendTo[OutSeq, l[[i]]]]; OutSeq
  • PARI
    a(n) = {ik = 1; nbk = 0; while (nbk != n, ik++; if (bigomega(ik) == omega(ik) + n, nbk++);); ik;} \\ Michel Marcus, Oct 06 2015
    

Formula

a(n+1) > 2*a(n).
a(n) >= 2^prime(n) for n < 5.
a(n) = A257851(n,n-1). - Reinhard Zumkeller, Nov 29 2015
a(n) = b(n)*2^(n+1), where b(n) consists of the values of k/2^excess(k) over odd k, sorted in ascending order. In particular, a(n) <= prime(n)*2^(n+1), with equality only when n = 2. - Charlie Neder, Jan 31 2019

Extensions

a(17)-a(21) from Jon E. Schoenfield, Sep 12 2015
More terms from Charlie Neder, Jan 31 2019

A260985 Numbers k such that A001222(k) - A001221(k) is an odd prime.

Original entry on oeis.org

16, 48, 64, 72, 80, 81, 108, 112, 162, 176, 192, 200, 208, 240, 256, 272, 288, 304, 320, 336, 360, 368, 392, 405, 432, 448, 464, 496, 500, 504, 528, 540, 560, 567, 592, 600, 624, 625, 648, 656, 675, 688, 704, 729, 752, 756, 768, 792, 800, 810, 816, 832, 848
Offset: 1

Author

Keywords

Comments

The asymptotic density of this sequence is (6/Pi^2) * Sum_{k>=1} f(a(k)) = 0.0626525..., where f(k) = A112526(k) * Product_{p|k} p/(p+1). - Amiram Eldar, Sep 24 2024

Examples

			16 is in the sequence because A001222(16) - A001221(16) = 3.
80 is in the sequence because A001222(80) - A001221(80) = 3.
192 is in the sequence because A001222(192) - A001221(192) = 5.
		

Crossrefs

Subsequence of A013929.
Subsequences: A195087, A195089, A195091.

Programs

  • Mathematica
    Select[Range[10^3], !PrimeQ[#] && PrimeQ[p = PrimeOmega[#] - PrimeNu[#]] && OddQ[p] &]
  • PARI
    isok(n) = (d=bigomega(n)-omega(n)) && (d != 2) && isprime(d); \\ Michel Marcus, Aug 07 2015
    
  • Python
    from sympy import isprime, primefactors
    def omega(n): return 0 if n==1 else len(primefactors(n))
    def bigomega(n): return 0 if n==1 else bigomega(n//min(primefactors(n))) + 1
    def ok(n):
        d = bigomega(n) - omega(n)
        return d%2 and isprime(d)
    print([n for n in range(1, 1001) if ok(n)]) # Indranil Ghosh, Apr 25 2017

A259172 Numbers in A259145 that are neither prime nor semiprime.

Original entry on oeis.org

561, 595, 1105, 1235, 1245, 1495, 1547, 1885, 2405, 2555, 2717, 2849, 3115, 3495, 3655, 3657, 3689, 3815, 4521, 4795, 4945, 5035, 5385, 5395, 5453, 5457, 5709, 5865, 6083, 6141, 6251, 6285, 6365, 6391, 6501, 6695, 6755, 6969, 7021, 7887, 8113, 8255, 8355
Offset: 1

Author

Keywords

Comments

Regarding the distribution: Let K be the union of primes and semiprimes in A259145. Let S be the set of other terms. The growth rate of the cardinality of S with respect to the cardinality of K is significantly slower. For instance, if we take the first 50000 terms of A259145, about 32.5 percent are contained in S. If we take the first 350000 terms, about 38.2 percent are contained in S.
a(n) that are in A002997 (Carmichael numbers) for a(n) <= 10^6 are 561, 1105, 8911, 10585, 29341, 825265.
a(n) that are in A051015 (Zeisel numbers) for a(n) <= 3*10^6 are 1885, 353977, 2953711.

Crossrefs

Subsequence of A000469, A033942, A050384 (conjuctered).

Programs

  • Mathematica
    Select[Range[25000], PrimeQ[#^2 - EulerPhi[#]] && PrimeNu[#] > 2 &]

Formula

A001221(a(n)) > 2.
A000005(a(n)) = 2^k, k >= 3.

A259145 Numbers k such that k^2 - phi(k) is prime, where phi() is A000010.

Original entry on oeis.org

2, 3, 7, 13, 33, 35, 65, 67, 77, 79, 91, 133, 139, 151, 163, 193, 221, 247, 249, 287, 299, 321, 337, 341, 349, 377, 379, 437, 457, 481, 533, 541, 551, 561, 581, 591, 595, 611, 613, 643, 721, 727, 763, 769, 779, 789, 803, 817, 843, 851, 869, 917, 919, 991
Offset: 1

Author

Keywords

Comments

Conjecture: a(n) is a cyclic number (see A003277) for all n.
A065508 is the subsequence of prime terms. - Michel Marcus, Jun 19 2015

Examples

			a(1) = 2, since phi(2) = 1, thus 2^2 - 1 = 3 (prime).
a(3) = 7, since phi(7) = 6, thus 7^2 - 6 = 43 (prime).
a(5) = 33, since phi(33) = 20, thus 33^2 - 20 = 1069 (prime).
		

Crossrefs

Programs

  • Magma
    [n: n in [1..1000] | IsPrime(n^2 - EulerPhi(n))]; // Vincenzo Librandi, Jun 21 2015
    
  • Mathematica
    Select[Range[2000], PrimeQ[#^2 - EulerPhi[#]] &]
  • PARI
    main(size)={ v=vector(size); i=0; m=1; while(iAnders Hellström, Jul 08 2015 */

A258436 Primes p of form x^2 - phi(x) such that (p-1)/tau(p-1) is also prime.

Original entry on oeis.org

157, 1069, 61837, 190573, 840109, 1950349, 2485453, 20616397, 38844349, 57648589, 133091053, 144685357, 188582029, 222029869, 276773389, 346282477, 399067213, 472656589, 827175949, 929558797, 1137622957, 1352220109, 1369037389
Offset: 1

Author

Keywords

Comments

Intersection of A252021 and A258435.

Crossrefs

Programs

  • Mathematica
    lst = Table[n^2 - EulerPhi[n], {n, 100000}]; Select[lst, PrimeQ[#] && PrimeQ[ ( # - 1)/DivisorSigma[0, # - 1] ] &]
  • PARI
    lista(nn) = {for (n=1, nn, if (isprime(p=n^2-eulerphi(n)) && (pp=p-1) && (type(r=pp/numdiv(pp))=="t_INT") && isprime(r), print1(p, ", ")););} \\ Michel Marcus, Jul 08 2015

A258435 Primes of form x^2 - phi(x) in increasing order.

Original entry on oeis.org

3, 7, 43, 157, 1069, 1201, 4177, 4423, 5869, 6163, 8209, 17581, 19183, 22651, 26407, 37057, 48649, 60793, 61837, 82129, 89137, 102829, 113233, 115981, 121453, 141793, 143263, 190573, 208393, 230929, 283609, 292141, 303097, 314401, 337069
Offset: 1

Author

Keywords

Examples

			a(1) = 3, because  2^2 - 1 = 3, and 1^2 - 1 = 0 is not a prime.
a(2) = 7, since 3^2 = 9, phi(3) = 2, so 9-2 = 7 (prime).
a(3) = 43, since 7^2 = 49, phi(7) = 6, so 49-6 = 43 (prime).
a(6) = 1201, since 35^2 = 1225, phi(35) = 24, so 1225-24 = 1201 (prime).
		

Crossrefs

Subset of A258434.
For phi see A000010.
A074268 is a subsequence. - Michel Marcus, Jun 19 2015
Cf. A259145.

Programs

  • Magma
    [a: n in [1..1000] | IsPrime(a) where a is n^2-EulerPhi(n) ]; // Vincenzo Librandi, Jun 03 2015
    
  • Mathematica
    lst = Table[n^2 - EulerPhi[n], {n, 1000}]; Select[lst, PrimeQ]
    Select[Table[n^2 - EulerPhi[n], {n, 1000}], PrimeQ] (* Vincenzo Librandi, Jun 03 2015 *)
  • PARI
    lista(nn) = {for (n=1, nn, if (isprime(p=n^2 -eulerphi(n)), print1(p, ", ")););} \\ Michel Marcus, Jul 08 2015

Extensions

More terms from Vincenzo Librandi, Jun 03 2015
Edited by Wolfdieter Lang, Jun 16 2015

A258400 Perfect powers m^k such that m, k and m+k are primes.

Original entry on oeis.org

8, 9, 25, 32, 121, 289, 841, 1681, 2048, 3481, 5041, 10201, 11449, 18769, 22201, 32041, 36481, 38809, 51529, 57121, 72361, 78961, 96721, 120409, 131072, 175561, 185761, 212521, 271441, 323761, 358801, 380689, 410881, 434281, 654481, 674041, 683929, 734449
Offset: 1

Author

Keywords

Comments

Necessarily either m or k = 2, thus if a(n) is even, it is a power of 2 with odd prime exponent, otherwise (if a(n) is odd), it is a square of odd prime.
For each term m^k, there will be another k^m.
a(3), a(5), a(11) are of the form n! + 1.
Let F(m,k) = m*k, such that m^k = a(n), so A108605 is a subsequence of F. For example a(1) = 2^3 and F(2,3) = A108605(1).

Examples

			a(1) = 8, because 8 = 2^3 and 2+3 = 5.
a(4) = 32, because 32 = 2^5 and 2+5 = 7.
a(5) = 121, because 121 = 11^2 and 11+2 = 13.
a(25) = 131072, because 131072 = 2^17 and 2+17 = 19.
		

Crossrefs

Subsequence of A001597, A000961.

Programs

  • Mathematica
    SmallestDivisor[n_] := If[n == 1, 1, Divisors[n][[2]]]; perfectPowerQ[n_] := n == 1 || GCD @@ FactorInteger[n][[All, 2]] > 1; ppl = Select[Range[200000], perfectPowerQ]; base[n_] := ppl[[n]]^(1/exp[n]); exp[n_] := SmallestDivisor[GCD @@ FactorInteger[ppl[[n]]][[All, 2]] ]; pp2l = Table[ {base[n], exp[n]}, {n, Length[ppl]}]; p[n_] := pp2l[[n]][[1]]; q[n_] := pp2l[[n]][[2]]; lt = Select[Range[Length[pp2l]], PrimeQ[p[#]] && PrimeQ[q[#]] && PrimeQ[p[#] + q[#]] &]; ppl[[lt]]
    Select[Range[10^6], Length[f = FactorInteger@ #] == 1 && PrimeQ@ f[[1, 2]] && PrimeQ@ Total@ f[[1]] &] (* Giovanni Resta, Jun 23 2015 *)

Extensions

a(28)-a(38) from Giovanni Resta, Jun 23 2015

A258468 a(n) = lcm(n, n - tau(n)).

Original entry on oeis.org

0, 0, 3, 4, 15, 6, 35, 8, 18, 30, 99, 12, 143, 70, 165, 176, 255, 36, 323, 140, 357, 198, 483, 48, 550, 286, 621, 308, 783, 330, 899, 416, 957, 510, 1085, 108, 1295, 646, 1365, 160, 1599, 714, 1763, 836, 585, 966, 2115, 912, 2254, 1100, 2397, 1196
Offset: 1

Author

Keywords

Comments

For tau see A000005.

Examples

			a(5) = 15, since tau(5) = 2, lcm(5, 3) = 15.
a(7) = 35, since tau(7) = 2, lcm(7, 5) = 35.
a(10) = 30, since tau(10) = 4, lcm (10, 6) = 30.
		

Crossrefs

Programs

  • Mathematica
    Table[LCM[n, n - DivisorSigma[0, n]], {n, 200}]
  • PARI
    vector(100, n, lcm(n, n-numdiv(n))) \\ Michel Marcus, May 31 2015

Formula

a(n) = lcm(n, n - tau(n)).
a(n) = n * (n - 2) = A005563(n-2) if n is prime.

Extensions

Edited by Wolfdieter Lang, Jun 16 2015