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-10 of 15 results. Next

A001317 Sierpiński's triangle (Pascal's triangle mod 2) converted to decimal.

Original entry on oeis.org

1, 3, 5, 15, 17, 51, 85, 255, 257, 771, 1285, 3855, 4369, 13107, 21845, 65535, 65537, 196611, 327685, 983055, 1114129, 3342387, 5570645, 16711935, 16843009, 50529027, 84215045, 252645135, 286331153, 858993459, 1431655765, 4294967295, 4294967297, 12884901891, 21474836485, 64424509455, 73014444049, 219043332147, 365072220245, 1095216660735, 1103806595329, 3311419785987
Offset: 0

Views

Author

Keywords

Comments

The members are all palindromic in binary, i.e., a subset of A006995. - Ralf Stephan, Sep 28 2004
J. H. Conway writes (in Math Forum): at least the first 31 numbers give odd-sided constructible polygons. See also A047999. - M. Dauchez (mdzzdm(AT)yahoo.fr), Sep 19 2005 [This observation was also made in 1982 by N. L. White (see letter). - N. J. A. Sloane, Jun 15 2015]
Decimal number generated by the binary bits of the n-th generation of the Rule 60 elementary cellular automaton. Thus: 1; 0, 1, 1; 0, 0, 1, 0, 1; 0, 0, 0, 1, 1, 1, 1; 0, 0, 0, 0, 1, 0, 0, 0, 1; ... . - Eric W. Weisstein, Apr 08 2006
Limit_{n->oo} log(a(n))/n = log(2). - Bret Mulvey, May 17 2008
Equals row sums of triangle A166548; e.g., 17 = (2 + 4 + 6 + 4 + 1). - Gary W. Adamson, Oct 16 2009
Equals row sums of triangle A166555. - Gary W. Adamson, Oct 17 2009
For n >= 1, all terms are in A001969. - Vladimir Shevelev, Oct 25 2010
Let n,m >= 0 be such that no carries occur when adding them. Then a(n+m) = a(n)*a(m). - Vladimir Shevelev, Nov 28 2010
Let phi_a(n) be the number of a(k) <= a(n) and respectively prime to a(n) (i.e., totient function over {a(n)}). Then, for n >= 1, phi_a(n) = 2^v(n), where v(n) is the number of 0's in the binary representation of n. - Vladimir Shevelev, Nov 29 2010
Trisection of this sequence gives rows of A008287 mod 2 converted to decimal. See also A177897, A177960. - Vladimir Shevelev, Jan 02 2011
Converting the rows of the powers of the k-nomial (k = 2^e where e >= 1) term-wise to binary and reading the concatenation as binary number gives every (k-1)st term of this sequence. Similarly with powers p^k of any prime. It might be interesting to study how this fails for powers of composites. - Joerg Arndt, Jan 07 2011
This sequence appears in Pascal's triangle mod 2 in another way, too. If we write it as
1111111...
10101010...
11001100...
10001000...
we get (taking the period part in each row):
.(1) (base 2) = 1
.(10) = 2/3
.(1100) = 12/15 = 4/5
.(1000) = 8/15
The k-th row, treated as a binary fraction, seems to be equal to 2^k / a(k). - Katarzyna Matylla, Mar 12 2011
From Daniel Forgues, Jun 16-18 2011: (Start)
Since there are 5 known Fermat primes, there are 32 products of distinct Fermat primes (thus there are 31 constructible odd-sided polygons, since a polygon has at least 3 sides). a(0)=1 (empty product) and a(1) to a(31) are those 31 non-products of distinct Fermat primes.
It can be proved by induction that all terms of this sequence are products of distinct Fermat numbers (A000215):
a(0)=1 (empty product) are products of distinct Fermat numbers in { };
a(2^n+k) = a(k) * (2^(2^n)+1) = a(k) * F_n, n >= 0, 0 <= k <= 2^n - 1.
Thus for n >= 1, 0 <= k <= 2^n - 1, and
a(k) = Product_{i=0..n-1} F_i^(alpha_i), alpha_i in {0, 1},
this implies
a(2^n+k) = Product_{i=0..n-1} F_i^(alpha_i) * F_n, alpha_i in {0, 1}.
(Cf. OEIS Wiki links below.) (End)
The bits in the binary expansion of a(n) give the coefficients of the n-th power of polynomial (X+1) in ring GF(2)[X]. E.g., 3 ("11" in binary) stands for (X+1)^1, 5 ("101" in binary) stands for (X+1)^2 = (X^2 + 1), and so on. - Antti Karttunen, Feb 10 2016

Examples

			Given a(5)=51, a(6)=85 since a(5) XOR 2*a(5) = 51 XOR 102 = 85.
From _Daniel Forgues_, Jun 18 2011: (Start)
  a(0) = 1 (empty product);
  a(1) = 3 = 1 * F_0 = a(2^0+0) = a(0) * F_0;
  a(2) = 5 = 1 * F_1 = a(2^1+0) = a(0) * F_1;
  a(3) = 15 = 3 * 5 = F_0 * F_1 = a(2^1+1) = a(1) * F_1;
  a(4) = 17 = 1 * F_2 = a(2^2+0) = a(0) * F_2;
  a(5) = 51 = 3 * 17 = F_0 * F_2 = a(2^2+1) = a(1) * F_2;
  a(6) = 85 = 5 * 17 = F_1 * F_2 = a(2^2+2) = a(2) * F_2;
  a(7) = 255 = 3 * 5 * 17 = F_0 * F_1 * F_2 = a(2^2+3) = a(3) * F_2;
  ... (End)
		

References

  • Jean-Paul Allouche and Jeffrey Shallit, Automatic sequences, Cambridge University Press, 2003, p. 113.
  • Henry Wadsworth Gould, Exponential Binomial Coefficient Series, Tech. Rep. 4, Math. Dept., West Virginia Univ., Morgantown, WV, Sept. 1961.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, pages 136-137.

Crossrefs

Cf. A038183 (odd bisection, 1D Cellular Automata Rule 90).
Iterates of A048724 (starting from 1).
Row 3 of A048723.
Positions of records in A268389.
Positions of ones in A268669 and A268384 (characteristic function).
Not the same as A045544 nor as A053576.
Cf. A045544.

Programs

  • Haskell
    a001317 = foldr (\u v-> 2*v + u) 0 . map toInteger . a047999_row
    -- Reinhard Zumkeller, Nov 24 2012
    (Scheme, with memoization-macro definec, two variants)
    (definec (A001317 n) (if (zero? n) 1 (A048724 (A001317 (- n 1)))))
    (definec (A001317 n) (if (zero? n) 1 (A048720bi 3 (A001317 (- n 1))))) ;; Where A048720bi implements the dyadic function given in A048720.
    ;; Antti Karttunen, Feb 10 2016
    
  • Magma
    [&+[(Binomial(n, i) mod 2)*2^i: i in [0..n]]: n in [0..41]]; // Vincenzo Librandi, Feb 12 2016
    
  • Maple
    A001317 := proc(n) local k; add((binomial(n,k) mod 2)*2^k, k=0..n); end;
  • Mathematica
    a[n_] := Nest[ BitXor[#, BitShiftLeft[#, 1]] &, 1, n]; Array[a, 42, 0] (* Joel Madigan (dochoncho(AT)gmail.com), Dec 03 2007 *)
    NestList[BitXor[#,2#]&,1,50] (* Harvey P. Dale, Aug 02 2021 *)
  • PARI
    a(n)=sum(i=0,n,(binomial(n,i)%2)*2^i)
    
  • PARI
    a=1; for(n=0, 66, print1(a,", "); a=bitxor(a,a<<1) ); \\ Joerg Arndt, Mar 27 2013
    
  • PARI
    A001317(n,a=1)={for(k=1,n,a=bitxor(a,a<<1));a} \\ M. F. Hasler, Jun 06 2016
    
  • PARI
    a(n) = subst(lift(Mod(1+'x,2)^n), 'x, 2); \\ Gheorghe Coserea, Nov 09 2017
    
  • Python
    from sympy import binomial
    def a(n): return sum([(binomial(n, i)%2)*2**i for i in range(n + 1)]) # Indranil Ghosh, Apr 11 2017
    
  • Python
    def A001317(n): return int(''.join(str(int(not(~n&k))) for k in range(n+1)),2) # Chai Wah Wu, Feb 04 2022

Formula

a(n+1) = a(n) XOR 2*a(n), where XOR is binary exclusive OR operator. - Paul D. Hanna, Apr 27 2003
a(n) = Product_{e(j, n) = 1} (2^(2^j) + 1), where e(j, n) is the j-th least significant digit in the binary representation of n (Roberts: see Allouche & Shallit). - Benoit Cloitre, Jun 08 2004
a(2*n+1) = 3*a(2*n). Proof: Since a(n) = Product_{k in K} (1 + 2^(2^k)), where K is the set of integers such that n = Sum_{k in K} 2^k, clearly K(2*n+1) = K(2*n) union {0}, hence a(2*n+1) = (1+2^(2^0))*a(2*n) = 3*a(2*n). - Emmanuel Ferrand and Ralf Stephan, Sep 28 2004
a(32*n) = 3 ^ (32 * n * log(2) / log(3)) + 1. - Bret Mulvey, May 17 2008
For n >= 1, A000120(a(n)) = 2^A000120(n). - Vladimir Shevelev, Oct 25 2010
a(2^n) = A000215(n); a(2^n-1) = a(2^n)-2; for n >= 1, m >= 0,
a(2^(n-1)-1)*a(2^n*m + 2^(n-1)) = 3*a(2^(n-1))*a(2^n*m + 2^(n-1)-2). - Vladimir Shevelev, Nov 28 2010
Sum_{k>=0} 1/a(k) = Product_{n>=0} (1 + 1/F_n), where F_n=A000215(n);
Sum_{k>=0} (-1)^(m(k))/a(k) = 1/2, where {m(n)} is Thue-Morse sequence (A010060).
If F_n is defined by F_n(z) = z^(2^n) + 1 and a(n) by (1/2)*Sum_{i>=0}(1-(-1)^{binomial(n,i)})*z^i, then, for z > 1, the latter two identities hold as well with the replacement 1/2 in the right hand side of the 2nd one by 1-1/z. - Vladimir Shevelev, Nov 29 2010
G.f.: Product_{k>=0} ( 1 + z^(2^k) + (2*z)^(2^k) ). - conjectured by Shamil Shakirov, proved by Vladimir Shevelev
a(n) = A000225(n+1) - A219843(n). - Reinhard Zumkeller, Nov 30 2012
From Antti Karttunen, Feb 10 2016: (Start)
a(0) = 1, and for n > 1, a(n) = A048720(3, a(n-1)) = A048724(a(n-1)).
a(n) = A048723(3,n).
a(n) = A193231(A000079(n)).
For all n >= 0: A268389(a(n)) = n.
(End)

A019320 Cyclotomic polynomials at x=2.

Original entry on oeis.org

2, 1, 3, 7, 5, 31, 3, 127, 17, 73, 11, 2047, 13, 8191, 43, 151, 257, 131071, 57, 524287, 205, 2359, 683, 8388607, 241, 1082401, 2731, 262657, 3277, 536870911, 331, 2147483647, 65537, 599479, 43691, 8727391, 4033, 137438953471, 174763, 9588151, 61681
Offset: 0

Views

Author

Keywords

Crossrefs

a(n) = A063696(n) - A063698(n) for up to n=104.
Same sequence in binary: A063672.

Programs

  • Maple
    with(numtheory,cyclotomic); f := n->subs(x=2,cyclotomic(n,x)); seq(f(i),i=0..64);
  • Mathematica
    Join[{2}, Table[Cyclotomic[n, 2], {n, 1, 40}]] (* Jean-François Alcover, Jun 14 2013 *)
  • PARI
    vector(20,n,polcyclo(n,2)) \\ Charles R Greathouse IV, May 18 2011

Formula

(lcm_{k=1..n} (2^k - 1))/lcm_{k=1..n-1} (2^k - 1), n > 1. - Vladeta Jovovic, Jan 20 2002
Let b(1) = 1 and b(n+1) = lcm(b(n), 2^n-1) then Phi(n,2) = b(n+1)/b(n) = a(n). - Thomas Ordowski, May 08 2013
a(0) = 2; for n > 0, a(n) = (2^n-1)/gcd(a(0)*a(1)*...*a(n-1), 2^n-1). - Thomas Ordowski, May 11 2013

A054431 Array read by antidiagonals: T(x, y) tells whether (x, y) are coprime (1) or not (0).

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Array is read along (x, y) = (1, 1), (1, 2), (2, 1), (1, 3), (2, 2), (3, 1), ...
There are nontrivial infinite paths of 1's in this sequence, moving only 1 step down or to the right at each step. Starting at (1,1), move down to (2,1), then (3,1), ..., (13,1). Then move right to (13,2), (13,3), ..., (13,11). From this point, alternate moving down to the next prime row, and right to the next prime column. - Franklin T. Adams-Watters, May 27 2014

Examples

			Rows start:
  1, 1, 1, 1, 1, 1, ...;
  1, 0, 1, 0, 1, 0, ...;
  1, 1, 0, 1, 1, 0, ...;
  1, 0, 1, 0, 1, 0, ...;
  1, 1, 1, 1, 0, 1, ...;
  1, 0, 0, 0, 1, 0, ...;
		

Crossrefs

Equal to A003989 with non-one values replaced with zeros.

Programs

  • Maple
    reduced_residue_set_0_1_array := n -> one_or_zero(igcd(((n-((trinv(n)*(trinv(n)-1))/2))+1), ((((trinv(n)-1)*(((1/2)*trinv(n))+1))-n)+1) ));
    one_or_zero := n -> `if`((1 = n),(1),(0)); # trinv given at A054425
    A054431_row := n -> seq(abs(numtheory[jacobi](n-k+1,k)),k=1..n);
    for n from 1 to 14 do A054431_row(n) od; # Peter Luschny, Aug 05 2012
  • Mathematica
    t[n_, k_] := Boole[CoprimeQ[n, k]]; Table[t[n-k+1, k], {n, 1, 14}, {k, 1, n}] // Flatten (* Jean-François Alcover, Dec 21 2012 *)
  • Sage
    def A054431_row(n): return [abs(kronecker_symbol(n-k+1,k)) for k in (1..n)]
    for n in (1..14): print(A054431_row(n)) # Peter Luschny, Aug 05 2012

Formula

T(n, k) = T(n, k-n) + T(n-k, k) starting with T(n, k)=0 if n or k are nonpositive and T(1, 1)=1. T(n, k) = A054521(n, k) if n>=k, = A054521(k, n) if n<=k. Antidiagonal sums are phi(n) = A000010(n). - Henry Bottomley, May 14 2002
As a triangular array for n>=1, 1<=k<=n, T(n,k) = |K(n-k+1|k)| where K(i|j) is the Kronecker symbol. - Peter Luschny, Aug 05 2012
Dirichlet g.f.: Sum_{n>=1} Sum_{k>=1} [gcd(n,k)=1]/n^s/k^c = zeta(s)*zeta(c)/zeta(s + c). - Mats Granvik, May 19 2021

A004729 Divisors of 2^32 - 1 (for a(1) to a(31), the 31 regular polygons with an odd number of sides constructible with ruler and compass).

Original entry on oeis.org

1, 3, 5, 15, 17, 51, 85, 255, 257, 771, 1285, 3855, 4369, 13107, 21845, 65535, 65537, 196611, 327685, 983055, 1114129, 3342387, 5570645, 16711935, 16843009, 50529027, 84215045, 252645135, 286331153, 858993459, 1431655765, 4294967295
Offset: 0

Views

Author

Keywords

Comments

The 32 divisors of the product of the 5 known Fermat primes.
The only known odd numbers whose totient is a power of 2. - Labos Elemer, Dec 06 2000
Equals first 32 members of A001317. Also, equals first 32 members of A053576. - Omar E. Pol, Dec 10 2008
Omitting the first term a(0)=1 gives A045544 (the number of sides of constructible odd-sided regular polygons.)

References

  • J. H. Conway and R. K. Guy, The Book of Numbers, Copernicus Press, New York, 1996; see p. 140.

Crossrefs

Programs

  • Mathematica
    Divisors[2^32-1]
  • PARI
    divisors(1<<32-1)

Extensions

Edited by Daniel Forgues, Jun 17 2011

A055094 Binary encoding of quadratic residue set of n. L(1/n) is the most significant bit, L(n-1/n) is the least significant bit, i.e., the rows of A055088 interpreted as binary numbers.

Original entry on oeis.org

0, 1, 2, 4, 9, 22, 52, 72, 146, 313, 738, 1156, 2829, 6772, 9520, 18496, 53643, 75154, 162438, 312328, 600116, 1513186, 4023888, 4737152, 9741609, 23182093, 38478994, 76286020, 166236537, 311977264, 921787428, 1212203072, 2962424994
Offset: 1

Views

Author

Antti Karttunen, Apr 04 2000

Keywords

Comments

L(a/n) stands for generalized Legendre symbol, with value = 1 only if a is a quadratic residue of n.

Crossrefs

Programs

  • Maple
    A055094 := proc(n)
        local i, z;
        z := 0;
        for i from 1 to n-1 do
            z := z*2;
            if (1 = numtheory[quadres](i, n)) then
                z := z + 1;
            fi;
        od;
        return z;
    end proc:
  • Mathematica
    a[n_] := With[{rr = Table[Mod[k^2, n], {k, 1, n - 1}] // Union}, Boole[ MemberQ[rr, #]]& /@ Range[n - 1]] // FromDigits[#, 2]&; Array[a, 40] (* Jean-François Alcover, Mar 05 2016*)
  • PARI
    {a(n)=sum(k=1, n-1, 2^(k-1)*(0Michael Somos, Oct 14 2006 */
    
  • Sage
    def A055094(n) :
        Q = quadratic_residues(n)
        z = 0
        for i in (1..n-1)  :
            z = z*2
            if i in Q : z += 1
        return z
    [A055094(n) for n in (1..33)] # Peter Luschny, Aug 08 2012

Formula

a(n) = qrs2bincode(n)

A054433 Numbers formed by interpreting the reduced residue set of every even number as a Zeckendorf Expansion.

Original entry on oeis.org

1, 4, 9, 33, 80, 174, 588, 1596, 3135, 9950, 28512, 56268, 196040, 496496, 888300, 3524577, 9224880, 18118362, 63239220, 150527400, 310190454, 1129200138, 2971168704, 5834056536, 18513646430, 53213956640, 104687896833
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Maple
    with(combinat,fibonacci); # one_or_zero given at A054431.
    A054433_as_sum := proc(n) local i; RETURN(add((one_or_zero(igcd(n,i))*fibonacci(i+1)),i=1..(n-1))); end;
  • Mathematica
    r[n_] := Sum[If[GCD[n, k] == 1, Fibonacci[n + 1 - k], 0], {k, 1, n}]; r /@ (2*Range[27]) (* Amiram Eldar, Oct 19 2019 *)

Formula

a(n) = A054433_as_sum(2*n).

A058213 Triangular arrangement of solutions of phi(x) = 2^n (n >= 0), where phi=A000010 is Euler's totient function. Each row corresponds to a particular n and its length is n+2 for 0 <= n <= 31, 32 for n >= 32. (This assumes that there are only 5 Fermat primes.)

Original entry on oeis.org

1, 2, 3, 4, 6, 5, 8, 10, 12, 15, 16, 20, 24, 30, 17, 32, 34, 40, 48, 60, 51, 64, 68, 80, 96, 102, 120, 85, 128, 136, 160, 170, 192, 204, 240, 255, 256, 272, 320, 340, 384, 408, 480, 510, 257, 512, 514, 544, 640, 680, 768, 816, 960, 1020, 771, 1024, 1028, 1088
Offset: 0

Views

Author

Labos Elemer, Nov 30 2000

Keywords

Comments

phi(x) is a power of 2 if and only if x is a power of 2 multiplied by a product of distinct Fermat primes. So if, as is conjectured, there are only 5 Fermat primes, then there are only 32 possibilities for the odd part of x, namely the divisors of 2^32-1, given in A004729.
The same numbers, in increasing order, are given in A003401.
The first entry in row n is the n-th divisor of 2^32-1 for 0 <= n <= 31 (A004729) and is 2^(n+1) for n >= 32. The last entry in row n is given in A058215.

Examples

			Triangle begins:
  { 1,   2},
  { 3,   4,   6},
  { 5,   8,  10,  12},
  {15,  16,  20,  24,  30},
  {17,  32,  34,  40,  48,  60},
  {51,  64,  68,  80,  96, 102, 120},
  {85, 128, 136, 160, 170, 192, 204, 240},
  ...
		

Crossrefs

Programs

  • Mathematica
    phiinv[ n_, pl_ ] := Module[ {i, p, e, pe, val}, If[ pl=={}, Return[ If[ n==1, {1}, {} ] ] ]; val={}; p=Last[ pl ]; For[ e=0; pe=1, e==0||Mod[ n, (p-1)pe/p ]==0, e++; pe*=p, val=Join[ val, pe*phiinv[ If[ e==0, n, n*p/pe/(p-1) ], Drop[ pl, -1 ] ] ] ]; Sort[ val ] ]; phiinv[ n_ ] := phiinv[ n, Select[ 1+Divisors[ n ], PrimeQ ] ]; Join@@(phiinv[ 2^# ]&/@Range[ 0, 10 ]) (* phiinv[ n, pl ] = list of x with phi(x)=n and all prime divisors of x in list pl. phiinv[ n ] = list of x with phi(x)=n *)

Extensions

Edited by Dean Hickerson, Jan 25 2002

A058214 Sum of solutions of phi(x) = 2^n.

Original entry on oeis.org

3, 13, 35, 105, 231, 581, 1315, 3225, 6711, 15221, 32755, 74505, 154407, 339397, 718115, 1589145, 3243831, 6946421, 14482675, 31259145, 63894567, 135588037, 281203235, 601400985, 1219907127, 2557715317, 5267017715, 11123540745, 22600784679, 47205887429
Offset: 0

Views

Author

Labos Elemer, Nov 30 2000

Keywords

Examples

			For n = 6, 2^n = 64; the solutions of phi(x) = 64 are {85,128,136,160,170,192,204,240}, whose sum is a(6) = 1315.
		

Crossrefs

Programs

  • Mathematica
    phiinv[n_, pl_] := Module[{i, p, e, pe, val}, If[pl=={}, Return[If[n==1, {1}, {}]]]; val={}; p=Last[pl]; For[e=0; pe=1, e==0||Mod[n, (p-1)pe/p]==0, e++; pe*=p, val=Join[val, pe*phiinv[If[e==0, n, n*p/pe/(p-1)], Drop[pl, -1]]]]; Sort[val]]; phiinv[n_] := phiinv[n, Select[1+Divisors[n], PrimeQ]]; Table[Plus@@phiinv[2^n], {n, 0, 30}] (* phiinv[n, pl] = list of x with phi(x)=n and all prime divisors of x in list pl. phiinv[n] = list of x with phi(x)=n *)
  • PARI
    a(n) = vecsum(invphi(2^n)); \\ Amiram Eldar, Nov 11 2024, using Max Alekseyev's invphi.gp

Formula

If there are only five Fermat primes, then a(n) = 2^(n-30) * 99852066765 for n > 31. - T. D. Noe, Jun 21 2012

Extensions

Edited by Dean Hickerson, Jan 25 2002
a(28)-a(29) from Donovan Johnson, Oct 22 2011

A058215 Largest solution of phi(x) = 2^n.

Original entry on oeis.org

2, 6, 12, 30, 60, 120, 240, 510, 1020, 2040, 4080, 8160, 16320, 32640, 65280, 131070, 262140, 524280, 1048560, 2097120, 4194240, 8388480, 16776960, 33553920, 67107840, 134215680, 268431360, 536862720, 1073725440, 2147450880, 4294901760, 8589934590
Offset: 0

Views

Author

Labos Elemer, Nov 30 2000

Keywords

Comments

The ratio of adjacent terms is 2 except for five terms (if there are exactly five Fermat primes). - T. D. Noe, Jun 21 2012

Examples

			For n = 6, 2^n = 64; the solutions of phi(x) = 64 are {85,128,136,160,170,192,204,240}; the largest is a(6) = 240.
		

Crossrefs

Programs

  • Mathematica
    phiinv[ n_, pl_ ] := Module[ {i, p, e, pe, val}, If[ pl=={}, Return[ If[ n==1, {1}, {} ] ] ]; val={}; p=Last[ pl ]; For[ e=0; pe=1, e==0||Mod[ n, (p-1)pe/p ]==0, e++; pe*=p, val=Join[ val, pe*phiinv[ If[ e==0, n, n*p/pe/(p-1) ], Drop[ pl, -1 ] ] ] ]; Sort[ val ] ]; phiinv[ n_ ] := phiinv[ n, Select[ 1+Divisors[ n ], PrimeQ ] ]; Table[ phiinv[ 2^n ][ [ -1 ] ], {n, 0, 30} ] (* phiinv[ n, pl ] = list of x with phi(x)=n and all prime divisors of x in list pl. phiinv[ n ] = list of x with phi(x)=n *)
  • PARI
    a(n) = invphiMax(2^n); \\ Amiram Eldar, Nov 11 2024, using Max Alekseyev's invphi.gp

Formula

Assuming there are only 5 Fermat primes (A019434), a(n) = 2^(n-30)*(2^32-1) for n >= 31.

Extensions

Edited by Dean Hickerson, Jan 25 2002

A063683 Integers formed from the reduced residue sets of even numbers and Fibonacci numbers.

Original entry on oeis.org

1, 3, 6, 21, 50, 108, 364, 987, 1938, 6150, 17622, 34776, 121160, 306852, 549000, 2178309, 5701290, 11197764, 39083988, 93031050, 191708244, 697884066, 1836283246, 3605645232, 11442062750, 32888033880, 64700678454
Offset: 1

Views

Author

Antti Karttunen, Jul 31 2001

Keywords

Comments

a(2n) = L(2n)*a(n), where L(2n) is the 2n-th Lucas number = A000032(2n).

Examples

			The reduced residue set of 2*6 = 12 is {1,5,7,11}, thus a(6) = F_1 + F_5 + F_7 + F_11 = 108.
		

Crossrefs

Programs

  • Maple
    A063683 := [seq(A063683_as_sum(2*n), n=1..101)]; A063683_as_sum := proc(n) local i; RETURN(add((one_or_zero(igcd(n,i))*fibonacci(i)),i=1..(n-1))); end; Yours, Antti Karttunen

Formula

a(n) = Sum_{i | gcd(i, 2n)=1} Fib(i) (where Fib(i) = A000045[i])
Showing 1-10 of 15 results. Next