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: Akiva Weinberger

Akiva Weinberger's wiki page.

Akiva Weinberger has authored 2 sequences.

A380408 a(n) = Sum_{k>=0} floor(n/(2k)!).

Original entry on oeis.org

0, 1, 3, 4, 6, 7, 9, 10, 12, 13, 15, 16, 18, 19, 21, 22, 24, 25, 27, 28, 30, 31, 33, 34, 37, 38, 40, 41, 43, 44, 46, 47, 49, 50, 52, 53, 55, 56, 58, 59, 61, 62, 64, 65, 67, 68, 70, 71, 74, 75, 77, 78, 80, 81, 83, 84, 86, 87, 89, 90, 92, 93, 95, 96, 98, 99, 101, 102, 104, 105, 107
Offset: 0

Author

Akiva Weinberger, Jan 23 2025

Keywords

Comments

Partial sum of A060832 except for the first term in the sum.
Congruent to A034968(n) mod 2. Therefore, the parity of a(n) is the parity of the n-th permutation of k elements (k>=n) in lexicographic order.
For even n, a(n) equals A059563(n/2) whenever cosh(1)*n - a(n) < 1. The first time this fails is n=70, as a(70)=107 but A059563(35)=108. For small n, such failures appear to be very rare; however, the asymptotic density of these failures approaches 1.

Crossrefs

Programs

  • PARI
    a(n) = round(sumpos(k=0, n\(2*k)!)); \\ Michel Marcus, Jan 24 2025

Formula

a(n) = cosh(1)*n - f(n) where f(n) = Sum_{k>=0} fract(n/(2k)!). Here, fract() is the fractional part. The error term f(n) is unbounded above, and the greatest lower bound is 0 (even excluding n=0). The first values for which f(n) > s for s=1,2,3 are f(13)=1.06005, f(407) = 2.03382, and f(22319) = 3.01669. The error is almost periodic: for large m, f(n) is approximately f(n+(2m)!). If n is odd, f(n) > 1/2. f(n) alternately rises and descends, that is, f(2*n)f(2*n+2) for all n.

A370578 Numbers k such that k + 1 divides 3^k + 1.

Original entry on oeis.org

0, 1, 3, 27, 531, 1035, 4635, 6363, 11475, 19683, 40131, 80955, 266475, 280755, 307395, 356643, 490371, 544347, 557955, 565515, 572715, 808227, 1256355, 1695483, 1959075, 1995075, 2771595, 2837835, 3004155, 3208491, 3337635, 3886443, 4670955, 5619411, 6434595, 6942817
Offset: 1

Author

Akiva Weinberger, Feb 22 2024

Keywords

Comments

The sequence is infinite. It contains all numbers of the form 3^(3^m).
After 3, the smallest term that is not a multiple of 9 is a(13) = 266475.
After 1, the smallest term that is not a multiple of 3 is a(36) = 6942817.
After 1, the smallest term that is not 3 (mod 8) is, also, a(36) = 6942817.
No term can be 2 (mod 3). Proof: Otherwise, k + 1 would be a multiple of 3 while 3^k + 1 would not.
All terms after 0 are odd. Proof: Suppose k is even, so that k+1 is odd. Let p be a prime factor of k+1. Then (by definition of k) 3^k == -1 (mod p) and 3^(2k) == 1 (mod p), so the order of 3 (mod p) divides 2k but not k. Thus the order of 3 is a multiple of 2^(v_2(k)+1) where v_2(k) = A007814(k) is the exponent of 2 in the prime factorization of k. But 3^(p-1) == 1 (mod p) by Fermat's little theorem, so p == 1 (mod 2^(v_2(k)+1)). Multiplying this for all prime factors p of k+1 gives k+1 == 1 (mod 2^(v_2(k)+1)), or k == 0 (mod 2^(v_2(k)+1)). But this contradicts the definition of v_2.
Apart from 0, the only possible residues mod 72 are 1, 3, 13, 25, 27, 37, 49, 51, and 61. It is conjectured that all appear eventually. (See John Omielan's answer to the author's question on Mathematics Stack Exchange.)
Empirically, approximately 80% of the terms are 27 (mod 72).

Examples

			(3^27+1)/(27+1) is an integer, so 27 is in the sequence. This can be shown efficiently using a modular exponentiation algorithm to find 3^27 mod 28.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[0,7000000],TrueQ[PowerMod[3,#,#+1]==#]&] (* James C. McMahon, Feb 25 2024 *)
  • Python
    for n in range(100_000_000):
      if (pow(3,n,n+1)==n):
        print(n)