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

A297402 a(n) = gcd_{k=1..n} (prime(k+1)^n-1)/2.

Original entry on oeis.org

1, 4, 1, 8, 1, 4, 1, 16, 1, 4, 1, 8, 1, 4, 1, 32, 1, 4, 1, 8, 1, 4, 1, 16, 1, 4, 1, 8, 1, 4, 1, 64, 1, 4, 1, 8, 1, 4, 1, 16, 1, 4, 1, 8, 1, 4, 1, 32, 1, 4, 1, 8, 1, 4, 1, 16, 1, 4, 1, 8, 1, 4, 1, 128, 1, 4, 1, 8, 1, 4, 1, 16, 1, 4, 1, 8, 1, 4, 1, 32, 1, 4, 1, 8, 1, 4, 1, 16, 1, 4, 1, 8, 1, 4, 1, 64, 1, 4, 1, 8
Offset: 1

Views

Author

Frank M Jackson, Dec 29 2017

Keywords

Comments

If p is an odd prime and p^n is the length of the odd leg of a primitive Pythagorean triangle it constrains the other leg and hypotenuse to be (p^(2n)-1)/2 and (p^(2n)+1)/2. The resulting triangle has a semiperimeter of p^n(p^n+1)/2, an area of (p^n-1)p^n(p^n+1)/4 and an inradius of (p^n-1)/2. a(n) equals the GCD of the inradius terms (p^n-1)/2 for at least the first n odd primes.
Conjecture: a(n) equals the GCD of the inradius terms (p^n-1)/2 for all odd primes, i.e. a(n) = GCD_{k=1..oo} (prime(k+1)^n-1)/2.
From David A. Corneth, Dec 29 2017: (Start)
All terms are powers of 2. Proof: suppose p | a(n) for some odd prime p. Then p | (p^n - 1) / 2 and so p | (p^n - 1) which isn't the case.
If n is odd then a(n) = 1. Proof: 2 | (p^k - 1) for all k and odd primes p. 3^n - 1 = 3 * 9^k - 1 = 3 - 1 = 2 (mod 4), so 3^n - 1 is of the form 2*m for some odd m, hence the GCD of all (p^n - 1) / 2 is 1 for odd n. (End)
This is the even bisection of A059159. - Rémy Sigrist, Dec 30 2017
a(n) is the size of the group Z_2*/(Z_2*)^n, where Z_2 is the ring of 2-adic integers. We have that Z_2*/(Z_2*)^n is the inverse limit of (Z/2^iZ)*/((Z/2^iZ)*)^n as i tends to infinity. If n is odd, then the group is trivial. If n = 2^e * n' is even, where n' is odd, then the group is the product of a cyclic group of order 2^e and a cyclic group of order 2. See A370050. - Jianing Song, May 12 2024

Examples

			a(4)=8 because for n=4 and for the first 4 odd primes {3, 5, 7, 11}, the term (p^n-1)/2 gives {40, 312, 1200, 7320} with a GCD of 8.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := GCD @@ Array[(Prime[# +1]^n -1)/2 &, n]; Array[a, 90] (* slightly modified by Robert G. Wilson v, Jan 01 2018 *)
    a[n_] := If[EvenQ[n], 2^(FactorInteger[n][[1]][[2]] + 1), 1]; Array[a, 90] (* Frank M Jackson, Jul 28 2018 *)
  • PARI
    a(n) = gcd(vector(n, i, (prime(i+1)^n-1)/2)) \\ Iain Fox, Dec 29 2017
    
  • PARI
    a(n)=if(n%2,1,2)<Charles R Greathouse IV, Jan 06 2018

Formula

It appears that for k > 0, a(2^k) = 2^(k+1).
a(n) = A006519(2n) for even n and a(n) = 1 for odd n. - David A. Corneth, Dec 29 2017
a(n) = A074723(n)/2. - Iain Fox, Dec 30 2017
Multiplicative with a(2^e) = 2^(e+1), a(p^e) = 1 for odd prime p. - Andrew Howroyd, Jul 25 2018
It appears that for m > 0, a(2m-1) = 1 (proved in comments) and a(2m) = 2^(k+1) where k is the exponent of the even prime in the prime factorization of 2m. - Frank M Jackson, Jul 28 2018
From Amiram Eldar, Nov 24 2023: (Start)
Dirichlet g.f.: zeta(s) * (1 + 1/2^s + 1/(2^(s-1) - 1)).
Sum_{k=1..n} a(k) ~ (n/log(2)) * (log(n) + gamma + log(2) - 1), where gamma is Euler's constant (A001620). (End)

A114375 a(n) = (a(n-1) XOR a(n-2)) + 1, a(0) = a(1) = 0.

Original entry on oeis.org

0, 0, 1, 2, 4, 7, 4, 4, 1, 6, 8, 15, 8, 8, 1, 10, 12, 7, 12, 12, 1, 14, 16, 31, 16, 16, 1, 18, 20, 7, 20, 20, 1, 22, 24, 15, 24, 24, 1, 26, 28, 7, 28, 28, 1, 30, 32, 63, 32, 32, 1, 34, 36, 7, 36, 36, 1, 38, 40, 15, 40, 40, 1, 42, 44, 7, 44, 44, 1, 46, 48, 31, 48, 48, 1, 50, 52, 7, 52, 52, 1
Offset: 0

Views

Author

Keywords

Comments

The function moving to the next overlapping pair in the sequence is f:(i,j) = (j, (i XOR j) + 1) is one-to one. This means that the only possible trajectories for the sequence are loops, "lines", and "rays". The inverse is f^{-1}: (i,j) = (i XOR (j-1), i) is defined except when j = 0. Thus the only infinite non-repeating trajectories are those starting with (i,0) for some i. If we define the size of a pair (i,j) to be the largest power of two <= max(i,j). It is trivial to see that the size of f(i,j) is always >= the size of (i,j). Coupled with the fact there are only finitely many pairs with a given size, this means that "line" trajectories are not possible. Any trajectory that goes to a larger size must be part of a ray, so that tracing back will eventually reach zero. - Franklin T. Adams-Watters, Mar 03 2014

Examples

			G.f. = x^2 + 2*x^3 + 4*x^4 + 7*x^5 + 4*x^6 + 4*x^7 + x^8 + 6*x^9 + 8*x^10 + ...
		

Crossrefs

Programs

  • Mathematica
    a[ n_] := If[ n < 0, BitXor[ a[n + 1], a[n + 2] - 1], If[n < 2, 0, 1 + BitXor[ a[n - 1], a[n - 2]]]]; (* Michael Somos, Mar 03 2014 *)
    a[ n_] := If[ Mod[n, 3] == 0, 2 n/3, If[ Mod[n, 3] == 1, 4 Quotient[n + 3, 6], If[ n == -1, -1, 2^IntegerExponent[ Fibonacci[n + 1], 2] - 1]]]; (* Michael Somos, Mar 03 2014 *)
    nxt[{a_,b_}]:={b,BitXor[a,b]+1}; NestList[nxt,{0,0},80][[All,1]] (* Harvey P. Dale, Feb 26 2020 *)

Formula

a(3n)=2n. a(3n+1)=4*floor((n+1)/2). a(6n+2)=1. a(6n+5)=2^(A001511(n+1)+2)-1.
a(3*n + 1) = A168273(n+1). a(3*n - 1) = A074723(n) - 1.- Michael Somos, Mar 03 2014
a(-n) = -a(n) if n == 0 (mod 3), a(-1-n) = -a(n) if n == 1 (mod 3), a(-2-n) = a(n) if n == 2 (mod 3). - Michael Somos, Mar 03 2014
Showing 1-2 of 2 results.