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: Yusuf Gurtas

Yusuf Gurtas's wiki page.

Yusuf Gurtas has authored 2 sequences.

A353123 a(n) is the first prime p for which the absolute value of the difference between the numbers of distinct prime factors of p+1 and p-1 is exactly n.

Original entry on oeis.org

3, 2, 31, 2309, 8191, 746129, 16546531, 300690389, 11823922111, 239378649509, 11003163441269, 304250263527209, 23293697005168589
Offset: 0

Author

Yusuf Gurtas, May 08 2022

Keywords

Comments

If a given prime p is less than a(n) then the numbers of distinct prime factors of p+1 and p-1 have a difference less than n.
From Daniel Suteu, May 11 2022: (Start)
a(13) <= 693386350578511591,
a(14) <= 42296567385289206991,
a(15) <= 3291505006196194517729,
a(16) <= 222099275340153625904489,
a(17) <= 12592092354842984193179971,
a(18) <= 873339227295479848905071071,
a(19) <= 54536351988824964540662450069,
a(20) <= 5513390541916364286137713664909. (End)
From Jon E. Schoenfield, May 11 2022: (Start)
For n > 1, if there exists any prime p < 2*prime(n+2)# such that the absolute difference of the numbers of distinct prime factors of p+1 and p-1 is exactly n, then (since a(n) <= p) it follows that a(n)+1 and a(n)-1, in some order, are either (1) a power of 2, and 2 times an odd number with n distinct prime factors, or (2) an odd prime times a power of 2, and the product of n+2 distinct primes. (In the first case, the numbers of distinct prime factors are 1 and n+1; in the second, they are 2 and n+2.)
E.g., for n = 6, given that p = 18888871 is a prime < 19399380 = 2*(2*3*5*7*11*13*17*19) and the prime factorizations of p+1 and p-1 are 2^3 * 2361109 and 2*3*5*7*11*13*17*37, then a(6)+1 must be too small to have more than 8 distinct prime factors, and also too small to have exactly 8 distinct prime factors with any factor having a multiplicity greater than 1. Thus, a(6) is the smallest prime p such that p+1 and p-1, in some order, are either (1) a power of 2, and 2 times an odd number with 6 distinct prime factors, or (2) a prime times a power of 2, and the product of 8 distinct primes. (As it turns out, a(6) = 16546531, so a(6) + 1 = 2^2 * 4136633 (2 distinct prime factors) and a(6) - 1 = 2*3*5*7*11*13*19*29 (8 distinct prime factors).)
For each n in 2..100, there exists such a prime p < 2*prime(n+2)#, so the numbers of distinct prime factors of a(n)+1 and a(n)-1 are, in some order, 1 and n+1 or 2 and n+2.
For n <= 100, the maximum value of a(n)/prime(n+2)# is a(16)/prime(18)# = 1.893617....
(End)

Examples

			a(2) = 31 because the number of distinct prime factors of 32 is 1 and the number of distinct prime factors of 30 is 3, giving a difference of 2. No prime less than 31 has this property.
		

Crossrefs

Cf. A067386.

Programs

  • PARI
    isok(p, n) = abs(omega(p-1)-omega(p+1)) == n;
    a(n) = my(p=2); while (!isok(p,n), p=nextprime(p+1)); p; \\ Michel Marcus, May 09 2022

Extensions

a(7)-a(8) from Amiram Eldar, May 08 2022
a(9)-a(10) from Yusuf Gurtas, May 08 2022
a(11) from Yusuf Gurtas, May 09 2022
a(9) corrected by Yusuf Gurtas, May 09 2022
a(12) from Yusuf Gurtas, May 09 2022

A328882 a(n) = n - 2^(sum of digits of n).

Original entry on oeis.org

-1, -1, -2, -5, -12, -27, -58, -121, -248, -503, 8, 7, 4, -3, -18, -49, -112, -239, -494, -1005, 16, 13, 6, -9, -40, -103, -230, -485, -996, -2019, 22, 15, 0, -31, -94, -221, -476, -987, -2010, -4057, 24, 9, -22, -85, -212, -467, -978, -2001, -4048, -8143, 18, -13, -76, -203, -458, -969, -1992, -4039, -8134, -16325, -4
Offset: 0

Author

Yusuf Gurtas, Oct 29 2019

Keywords

Comments

This sequence is a map from the set of nonnegative integers into the set of all integers. It is clearly not one-to-one. It is not known if it is onto.
Comments from N. J. A. Sloane, Nov 17 2019: (Start)
For m >= 0, A329002 gives an expression for the first time that m appears in this sequence (if it does appear), and A329492 plays a similar role for negative m.
In all these sequences it is safer to say "sum of digits" (which is A007953) rather than "digital sum" (which is also A007953), because many people confuse the latter term with the "digital root" (A010888). (End)

Examples

			a(0) = 0 - 2^0 = -1.
a(11) = 11 - 2^(1+1) = 7.
a(32) = 32 - 2^(3+2) = 0. The next time 0 occurs is at a(1180591620717411303424) = 1180591620717411303424 - 2^(70)=0.
The only known occurrence of 1 is when n=513: a(513) = 513 - 2^(5+1+3) = 1.
Smallest n such that a(n) = k, from _N. J. A. Sloane_, Nov 16 2019:
k = 0    1       2     3  4   5  6  7  8  9  10 ...
n = 32 513 2^103+2  1027 12 133 22 11 10 41 522 ...
k = -1 -2 -3 -4 -5   -6      -7  -8 -9     -10 11 ...
n =  0  2 13 60  3 1018 2^103-7 504 23 2^18-10  ? ...
		

Crossrefs

Cf. A007953 (sum of digits of n), A329002, A329492, A329493.
Cf. also A007953, A010888.

Programs

  • Mathematica
    Array[# - 2^Total[IntegerDigits@ #] &, 61, 0] (* Michael De Vlieger, Oct 30 2019 *)
  • PARI
    a(n) = n - 2^sumdigits(n); \\ Michel Marcus, Oct 30 2019

Formula

a(n) = n - 2^A007953(n).

Extensions

More terms from Michel Marcus, Oct 30 2019