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: Ahmad J. Masad

Ahmad J. Masad's wiki page.

Ahmad J. Masad has authored 19 sequences. Here are the ten most recent ones:

A377570 a(n) = round((H(n) + e^H(n)*log(H(n)) + sigma(n))/2).

Original entry on oeis.org

1, 3, 5, 7, 8, 12, 12, 16, 17, 21, 19, 28, 23, 29, 30, 35, 30, 42, 34, 46, 43, 46, 41, 61, 48, 55, 55, 65, 53, 76, 57, 74, 68, 73, 71, 94, 69, 82, 81, 100, 77, 106, 81, 103, 101, 100, 89, 129, 97, 116, 107, 122, 102, 136, 114, 139, 121, 127, 114, 169, 118, 137
Offset: 1

Author

Ahmad J. Masad, Nov 01 2024

Keywords

Comments

The idea of this sequence is finding the nearest integer to the arithmetic mean between the two sides of the inequality that is equivalent to the Riemann hypothesis. The inequality is sigma(n) < H(n) + e^H(n)*log(H(n)), where H(n) are the harmonic numbers.
Conjecture: For each positive integer k, there exist at least one positive integer m such that there are exactly k terms in this sequence that are equal to m. In the first 10000 terms, each value occurs at most 4 times. However, as n becomes larger, we can see from the scatterplot that the conjecture might be true. - Ahmad J. Masad, Apr 03 2025

Examples

			For n=6, sigma(6)=12 and H(6)=1/1+1/2+1/3+1/4+1/5+1/6=2.45 and (2.45+e^2.45*log(2.45)+12)/2=12.417... and round(12.417...)=12; hence a(6)=12.
		

Crossrefs

Programs

  • Mathematica
    f[x_] := x + Exp[x] * Log[x]; a[n_] := Round[(f[HarmonicNumber[n]] + DivisorSigma[1, n])/2]; Array[a, 100] (* Amiram Eldar, Nov 01 2024 *)

A374258 Square array: T(n,k) = ((3^(n+1) + 1)^(k-1) + 2)/3, read by descending antidiagonals.

Original entry on oeis.org

1, 4, 1, 34, 10, 1, 334, 262, 28, 1, 3334, 7318, 2242, 82, 1, 33334, 204886, 183790, 19846, 244, 1, 333334, 5736790, 15070726, 4842262, 177634, 730, 1, 3333334, 160630102, 1235799478, 1181511766, 129672334, 1595782, 2188, 1, 33333334, 4497642838, 101335557142, 288288870742, 94660803334, 3491569558, 14353282, 6562, 1
Offset: 1

Author

Ahmad J. Masad, Jul 01 2024

Keywords

Comments

This sequence gives the matrix M in the definition of A365450. Similar to A266577.
Conjecture: For each natural number n, the digits of the product of any (n+1) not necessarily distinct terms of the n-th row in the base (3^(n+1)+1) numeral system appear in nondecreasing order.
Proof of the conjecture. Let b := 3^(n+1)+1. The product of any (n+1) terms of the n-th row has the form p/(b-1), where p is the product of (n+1) numbers of the form b^k+2. Let p = (dm, ..., d1, d0)b, and we have d0+d1+...+dm = 3^(n+1) = b-1. Then p/(b-1) = (dm, ..., d2+...+dm, 1+d1+...+dm)_b, which do form a nondecreasing sequence. - _Max Alekseyev, Jul 03 2024
The preceding result is similar to the property of the nondecreasing products mentioned in A237424. Specifically; the first row of this array is A093137, which is a subsequence of A237424. - Ahmad J. Masad, Jul 30 2024
More generally: Let r and n be positive integers and S be a sequence of all numbers of the form (b^c(1)+b^c(2)+...+b^c(r)+1)/(r+1), where c(1),...,c(r) are nonnegative integers. Then in the numeral system base b := (r+1)^(n+1)+1, the digits of the product of any n+1 (possibly equal) terms of S appear in nondecreasing order. Proof is similar. - Ahmad J. Masad, Jul 30 2024; edited by Max Alekseyev, Aug 01 2024

Examples

			The array begins:
  1    4    34   334   3334
  1   10   262  7318
  1   28  2242
  1   82
  1
Example of the conjecture: Take 5 terms from the 4th row and find their product in base 244 numeral system (since 3^(4+1)+1=244) as follows: 82,19846 twice and 4842262 twice, the product is equal to 82*19846*19846*4842262*4842262 = 757279838666167487626528 = (1, 3, 7, 19, 31, 55, 91, 115, 163, 195, 212)_244 which is in agreement with the conjecture since the digits in 244 base numeral system are in nondecreasing order.
Example of the general property: Take r=3 and n=4, then b=4^5+1=1025. The sequence S is the sequence of the numbers of the form (1025^b(1)+1025^b(2)+1025^b(3)+1)/4. Let's multiply 5 terms of the sequence S, say ((1025^0+1025^0+1025^1+1)/4)*(((1025^0+1025^1+1025^1+1)/4)^2)*(((1025^3+1025^4+1025^4+1)/4)^2) = 257*513^2*552175667969^2 = 20621601208620337073958261562113 = (16,112,308,488,580,680,832,936,964,984,1013)_1025. The digits of the product in base 1025 are in nondecreasing order.
		

Crossrefs

Programs

  • Mathematica
    T[n_, k_] := ((3^(n+1) + 1)^(k-1) + 2)/3; Table[T[k, n-k+1], {n, 1, 9}, {k, 1, n}] // Flatten (* Amiram Eldar, Jul 02 2024 *)
  • PARI
    T(n,k) = ((3^(n+1) + 1)^(k-1) + 2)/3 \\ Andrew Howroyd, Jul 01 2024

A372456 a(n) = 1 if abs(tan(n)) > 1, 0 otherwise.

Original entry on oeis.org

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

Author

Ahmad J. Masad, May 01 2024

Keywords

Examples

			For n = 43, tan(43) = -1.498387339..., and abs(-1.498387339...) > 1, so a(43) = 1.
		

Crossrefs

Programs

  • Mathematica
    Table[Boole[Abs[Tan[n]] > 1], {n, 1, 100}] (* Amiram Eldar, May 02 2024 *)
  • PARI
    a(n) = abs(tan(n)) > 1; \\ Michel Marcus, May 01 2024

A371065 a(1)=2; for n > 1, a(n) is the least prime number p > a(n-1) such that p + 2^(n-1) is a prime number.

Original entry on oeis.org

2, 3, 7, 11, 13, 29, 37, 53, 61, 89, 127, 131, 157, 197, 223, 269, 307, 359, 367, 419, 463, 491, 547, 593, 607, 641, 643, 701, 823, 947, 1213, 1229, 1237, 1319, 1327, 1451, 1723, 2381, 3019, 3299, 3307, 3371, 3847, 4493, 4621, 4931, 5179, 5783, 6043, 6197, 6469
Offset: 1

Author

Ahmad J. Masad, Mar 09 2024

Keywords

Examples

			For n=5, the preceding term a(4)=11 and 2^(5-1)=16, so a(5) is the least prime p > 11 such that p+16 is a prime too, which is p = 13 = a(5).
From _Michael De Vlieger_, Mar 10 2024: (Start)
Table of first terms:
   n   a(n)  2^(n+1)  a(n)+2^(n+1)
  -------------------------------
   1      2       1         3
   2      3       2         5
   3      7       4        11
   4     11       8        19
   5     13      16        29
   6     29      32        61
   7     37      64       101
   8     53     128       181
   9     61     256       317
  10     89     512       601
  11    127    1024      1151
  12    131    2048      2179
  ... (End)
		

Crossrefs

Programs

  • Mathematica
    a[1] = 2; a[n_] := a[n] = Module[{p = NextPrime[a[n - 1]]}, While[! PrimeQ[p + 2^(n - 1)], p = NextPrime[p]]; p]; Array[a, 50] (* Amiram Eldar, Mar 10 2024 *)

A365450 Triangle read by rows: row n gives y transposed, where y is the solution to the matrix equation M*y=b, where the matrix M and vector b are defined by M(i,j) = ((3^(i+1) + 1)^(j-1) + 2)/3 and b(i) = ((3^(i+1)+1)^n + 2)/3 for 1 <= i,j <= n.

Original entry on oeis.org

4, -118, 38, 9838, -3396, 120, -2413594, 851584, -32676, 364, 1765112266, -627258560, 24705064, -298396, 1094, -3864390160942, 1376531364480, -54681938592, 677595512, -2692068, 3282, 25363211967758062, -9041746935535360, 360199412405184, -4501063688336, 18342945728, -24228552, 9844
Offset: 1

Author

Ahmad J. Masad, Sep 03 2023

Keywords

Comments

This sequence is similar to A292625, see the MathOverflow link.
The matrix M is given by A374258. - Ahmad J. Masad, Jul 29 2024

Examples

			Triangle begins:
         4;
      -118,     38;
      9838,  -3396,    120;
  -2413594, 851584, -32676, 364;
  ...
		

Crossrefs

Programs

  • PARI
    M(n) = matrix(n, n, i, j, ((3^(i+1) + 1)^(j-1) + 2)/3);
    b(n) = vector(n, i, ((3^(i+1)+1)^n + 2)/3);
    row(n) = matsolve(M(n), b(n)~)~; \\ Michel Marcus, Sep 03 2023

Extensions

More terms from Michel Marcus, Sep 03 2023

A339540 Primes p that are the smallest prime congruent to 1 mod k only for k = p - 1.

Original entry on oeis.org

2, 3, 5, 13, 37, 61, 157, 421, 541, 613, 673, 877, 1153, 1201, 1213, 1381, 1621, 1873, 1933, 2003, 2017, 2027, 2039, 2063, 2081, 2087, 2099, 2129, 2143, 2179, 2207, 2239, 2243, 2251, 2267, 2273, 2281, 2351, 2393, 2399, 2411, 2423, 2441, 2447, 2459, 2467, 2503
Offset: 1

Author

Ahmad J. Masad, Dec 08 2020

Keywords

Comments

Old name: Primes that are not terms of A338929.
Equivalently, primes that occur only once in A034694. - Peter Munn, May 02 2023

Crossrefs

Extensions

New name from Peter Munn, May 02 2023

A338929 a(n) is the smallest prime number p larger than A072668(n) such that p is equal to 1 (mod A072668(n)).

Original entry on oeis.org

7, 11, 29, 17, 19, 23, 53, 29, 31, 103, 191, 41, 43, 47, 73, 101, 53, 109, 59, 311, 97, 67, 103, 71, 149, 191, 79, 83, 173, 89, 181, 283, 97, 197, 101, 103, 107, 109, 331, 113, 229, 709, 367, 311, 127, 193, 131, 269, 137, 139, 569, 293, 149, 151, 229, 463
Offset: 1

Author

Ahmad J. Masad, Nov 15 2020

Keywords

Comments

In A002808(n)-base numeral system, a(n) is the smallest prime number for which the digital root is 1.
Conjecture: As n approaches infinity, the probability that a prime number is a term in this sequence approaches 1.
Conjecture: There are infinitely many primes that are not terms in this sequence.
The sequence for all positive numbers (instead of A072668) is A034694. - Peter Munn, May 02 2023

Examples

			For n=20, A072668(20)=31, and 311 is the smallest prime number p larger than 31 such that p is equal to 1 (mod 31), so a(20)=311.
		

Crossrefs

Programs

  • Mathematica
    Map[Block[{p = NextPrime[#]}, While[Mod[p, #] != 1, p = NextPrime[p]]; p] &, Select[Range[4, 78], CompositeQ] - 1] (* Michael De Vlieger, Dec 10 2020 *)
  • PARI
    f(x) = {my(p=nextprime(x)); while ((p % x) != 1, p = nextprime(p+1)); p;}
    lista(nn) = {my(list = List()); forcomposite(c=1, nn, listput(list, f(c-1));); Vec(list);} \\ Michel Marcus, Nov 17 2020

Extensions

More terms from Michel Marcus, Nov 17 2020

A331189 Decimal expansion of Pi^Pi + e^e.

Original entry on oeis.org

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

Author

Ahmad J. Masad, Jan 11 2020

Keywords

Examples

			51.61642184868717596075...
		

Programs

  • Mathematica
    RealDigits[Pi^Pi + Exp[E], 10, 100][[1]] (* Amiram Eldar, Jan 11 2020 *)

Formula

Equals A073233 + A073226.

A331094 Decimal expansion of Pi^Pi - e^e.

Original entry on oeis.org

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

Author

Ahmad J. Masad, Jan 08 2020

Keywords

Examples

			21.30789736572864758123039575006221176...
		

Crossrefs

Programs

  • Mathematica
    RealDigits[Pi^Pi - Exp[E], 10, 100][[1]] (* Amiram Eldar, Jan 09 2020 *)
  • PARI
    Pi^Pi - exp(exp(1)) \\ Michel Marcus, Jan 09 2020

A330349 a(n) = A070826(n+1) - 2^(n-1).

Original entry on oeis.org

2, 13, 101, 1147, 14999, 255223, 4849781, 111546307, 3234846359, 100280244553, 3710369066381, 152125131761557, 6541380665830919, 307444891294237513, 16294579238595005981, 961380175077106286767
Offset: 1

Author

Ahmad J. Masad, Dec 11 2019

Keywords

Comments

Conjecture: For each value of n, the power of each prime number in the prime factorization of a(n) is equal to 1.

Examples

			a(4) = 1147 = 31*37.
a(10) = A070826(11) - 2^9 = 100280245065 - 512 = 100280244553 = A000040(4129119109).
		

Crossrefs

Programs

  • PARI
    a(n) = prod(k=1, n+1, prime(k))/2  - 2^(n-1); \\ Michel Marcus, Dec 11 2019
    
  • Python
    from sympy import primorial
    def A330349(n): return (primorial(n+1)>>1)-(1<Chai Wah Wu, Jul 21 2022