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 43 results. Next

A136386 Quotient obtained when A037097(n) is considered as a GF(2)[X]-polynomial and it is divided by (x + 1) ^ A000225(n-1) (= A051179(n-2)).

Original entry on oeis.org

4, 8, 352, 3728, 7269662752, 761166466256046848, 390022035611646394530728097023856870592, 91600670557117582933643002658167825054614175029432880501373395030525438396928, 13417853484388319477475698658536993288839029124735549539652836318808118017743106800015257954250357092148394821846783842030516713870361254572407216621548672
Offset: 3

Views

Author

Antti Karttunen, Dec 29 2007

Keywords

Crossrefs

A136387 shows the same sequence in binary base. Cf. A037096, A037097, A136380, A136382, A136384.

A370458 Partial products of A051179.

Original entry on oeis.org

1, 3, 45, 11475, 752014125, 3229876072253041875, 59580697294650083747194059426068878125, 20274260698223485458204828871028994444941136941453077244297515184669623921875
Offset: 0

Views

Author

Amiram Eldar, Feb 19 2024

Keywords

Crossrefs

Programs

  • Mathematica
    FoldList[Times, Table[2^(2^n) - 1, {n, 0, 7}]]
  • PARI
    lista(nmax) = {my(v = 1); for(i = 0, nmax, v *= (2^(2^i) - 1); print1(v, ", "));}
    
  • Python
    from math import prod
    def A370458(n): return prod((1<<(1<Chai Wah Wu, Feb 19 2024

Formula

a(n) = Product_{k=0..n} A051179(k).
Sum_{n>=0} 1/a(n) = A258714 = 1/A215016 - 3/2 = 1.355642702854... (Knuth, 2013).

A173475 Triangle T(n, k) = c(n)/(c(k)*c(n-k)) where c(n) = Product_{j=0..n} A051179(j), read by rows.

Original entry on oeis.org

1, 1, 1, 1, 5, 1, 1, 85, 85, 1, 1, 21845, 371365, 21845, 1, 1, 1431655765, 6254904037285, 6254904037285, 1431655765, 1, 1, 6148914691236517205, 1760625833240390967011987365, 452480839142780478522080752805, 1760625833240390967011987365, 6148914691236517205, 1
Offset: 0

Views

Author

Roger L. Bagula, Feb 19 2010

Keywords

Examples

			Triangle begins as:
  1;
  1,          1;
  1,          5,             1;
  1,         85,            85,             1;
  1,      21845,        371365,         21845,          1;
  1, 1431655765, 6254904037285, 6254904037285, 1431655765, 1;
		

Crossrefs

Cf. A051179.

Programs

  • Mathematica
    c[n_]:= Product[2^(2^j) - 1, {j,0,n}];
    T[n_, k_]:= c[n]/(c[k]*c[n-k]);
    Table[T[n, k], {n,0,8}, {k,0,n}]//Flatten
  • Sage
    @CachedFunction
    def c(n): return product( 2^(2^j) -1 for j in (0..n) )
    def T(n,k): return c(n)/(c(k)*c(n-k))
    flatten([[T(n,k) for k in (0..n)] for n in (0..8)]) # G. C. Greubel, Apr 26 2021

Formula

T(n, k) = c(n)/(c(k)*c(n-k)) where c(n) = Product_{j,0,n} A051179(j).

Extensions

Edited by G. C. Greubel, Apr 26 2021

A063487 Number of distinct prime divisors of 2^(2^n)-1 (A051179).

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 7, 9, 11, 13, 16, 20, 25
Offset: 0

Views

Author

Jason Earls, Jul 28 2001

Keywords

Comments

2^(2^n)-1 is the product of the first n Fermat numbers F(0),...,F(n-1) (A000215). Hence this sequence is just the summation of A046052, which gives the number of prime factors in each Fermat number. - T. D. Noe, Jan 07 2003

References

  • D. M. Burton, Elementary Number Theory, Allyn and Bacon Inc., Boston MA, 1976, p. 238.

Crossrefs

Programs

  • PARI
    for(n=0,22,print(omega(2^(2^n)-1)))

Extensions

More terms from T. D. Noe, Jan 07 2003

A000215 Fermat numbers: a(n) = 2^(2^n) + 1.

Original entry on oeis.org

3, 5, 17, 257, 65537, 4294967297, 18446744073709551617, 340282366920938463463374607431768211457, 115792089237316195423570985008687907853269984665640564039457584007913129639937
Offset: 0

Views

Author

Keywords

Comments

It is conjectured that just the first 5 numbers in this sequence are primes.
An infinite coprime sequence defined by recursion. - Michael Somos, Mar 14 2004
For n>0, Fermat numbers F(n) have digital roots 5 or 8 depending on whether n is even or odd (Koshy). - Lekraj Beedassy, Mar 17 2005
This is the special case k=2 of sequences with exact mutual k-residues. In general, a(1)=k+1 and a(n)=min{m | m>a(n-1), mod(m,a(i))=k, i=1,...,n-1}. k=1 gives Sylvester's sequence A000058. - Seppo Mustonen, Sep 04 2005
For n>1 final two digits of a(n) are periodically repeated with period 4: {17, 57, 37, 97}. - Alexander Adamchuk, Apr 07 2007
For 1 < k <= 2^n, a(A007814(k-1)) divides a(n) + 2^k. More generally, for any number k, let r = k mod 2^n and suppose r != 1, then a(A007814(r-1)) divides a(n) + 2^k. - T. D. Noe, Jul 12 2007
From Daniel Forgues, Jun 20 2011: (Start)
The Fermat numbers F_n are F_n(a,b) = a^(2^n) + b^(2^n) with a = 2 and b = 1.
For n >= 2, all factors of F_n = 2^(2^n) + 1 are of the form k*(2^(n+2)) + 1 (k >= 1).
The products of distinct Fermat numbers (in their binary representation, see A080176) give rows of Sierpiński's triangle (A006943). (End)
Let F(n) be a Fermat number. For n > 2, F(n) is prime if and only if 5^((F(n)-1)/4) == sqrt(F(n)-1) (mod F(n)). - Arkadiusz Wesolowski, Jul 16 2011
Conjecture: let the smallest prime factor of Fermat number F(n) be P(F(n)). If F(n) is composite, then P(F(n)) < 3*2^(2^n/2 - n - 2). - Arkadiusz Wesolowski, Aug 10 2012
The Fermat primes are not Brazilian numbers, so they belong to A220627, but the Fermat composites are Brazilian numbers so they belong to A220571. For a proof, see Proposition 3 page 36 on "Les nombres brésiliens" in Links. - Bernard Schott, Dec 29 2012
It appears that this sequence is generated by starting with a(0)=3 and following the rule "Write in binary and read in base 4". For an example of "Write in binary and read in ternary", see A014118. - John W. Layman, Jul 30 2013
Conjecture: the numbers > 5 in this sequence, i.e., 2^2^k + 1 for k>1, are exactly the numbers n such that (n-1)^4-1 divides 2^(n-1)-1. - M. F. Hasler, Jul 24 2015

Examples

			a(0) = 1*2^1 + 1 = 3 = 1*(2*1) + 1.
a(1) = 1*2^2 + 1 = 5 = 1*(2*2) + 1.
a(2) = 1*2^4 + 1 = 17 = 2*(2*4) + 1.
a(3) = 1*2^8 + 1 = 257 = 16*(2*8) + 1.
a(4) = 1*2^16 + 1 = 65537 = 2048*(2*16) + 1.
a(5) = 1*2^32 + 1 = 4294967297 = 641*6700417 = (10*(2*32) + 1)*(104694*(2*32) + 1).
a(6) = 1*2^64 + 1 = 18446744073709551617 = 274177*67280421310721 = (2142*(2*64) + 1)*(525628291490*(2*64) + 1).
		

References

  • M. Aigner and G. M. Ziegler, Proofs from The Book, Springer-Verlag, Berlin, 2nd. ed., 2001; see p. 3.
  • T. M. Apostol, Introduction to Analytic Number Theory, Springer-Verlag, 1976, page 7.
  • P. Bachmann, Niedere Zahlentheorie (1902, 1910), reprinted Chelsea, NY, 1968, vol. 2, p. 87.
  • James Gleick, Faster, Vintage Books, NY, 2000 (see pp. 259-261).
  • Jan Gullberg, Mathematics from the Birth of Numbers, W. W. Norton & Co., NY & London, 1997, §3.2 Prime Numbers, pp. 78-79.
  • R. K. Guy, Unsolved Problems in Number Theory, A3.
  • G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers. 3rd ed., Oxford Univ. Press, 1954, p. 14.
  • E. Hille, Analytic Function Theory, Vol. I, Chelsea, N.Y., see p. 64.
  • T. Koshy, "The Digital Root Of A Fermat Number", Journal of Recreational Mathematics Vol. 32 No. 2 2002-3 Baywood NY.
  • M. Krizek, F. Luca & L. Somer, 17 Lectures on Fermat Numbers, Springer-Verlag NY 2001.
  • C. S. Ogilvy and J. T. Anderson, Excursions in Number Theory, Oxford University Press, NY, 1966, p. 36.
  • Clifford A. Pickover, A Passion for Mathematics, Wiley, 2005; see pp. 18, 59.
  • C. A. Pickover, The Math Book, Sterling, NY, 2009; see p. 202.
  • Paulo Ribenboim, The Little Book of Bigger Primes, Springer-Verlag NY 2004. See pp. 6-7, 70-75.
  • 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.
  • David Wells, The Penguin Dictionary of Curious and Interesting Numbers, Penguin Books, 1987, pp. 148-149.

Crossrefs

a(n) = A001146(n) + 1 = A051179(n) + 2.
See A004249 for a similar sequence.
Cf. A080176 for binary representation of Fermat numbers.

Programs

  • Haskell
    a000215 = (+ 1) . (2 ^) . (2 ^)  -- Reinhard Zumkeller, Feb 13 2015
    
  • Maple
    A000215 := n->2^(2^n)+1;
  • Mathematica
    Table[2^(2^n) + 1, {n, 0, 8}] (* Alonso del Arte, Jun 07 2011 *)
  • Maxima
    A000215(n):=2^(2^n)+1$ makelist(A000215(n),n,0,10); /* Martin Ettl, Dec 10 2012 */
    
  • PARI
    a(n)=if(n<1,3*(n==0),(a(n-1)-1)^2+1)
    
  • Python
    def a(n): return 2**(2**n) + 1
    print([a(n) for n in range(9)]) # Michael S. Branicky, Apr 19 2021

Formula

a(0) = 3; a(n) = (a(n-1)-1)^2 + 1, n >= 1.
a(n) = a(n-1)*a(n-2)*...*a(1)*a(0) + 2, n >= 0, where for n = 0, we get the empty product, i.e., 1, plus 2, giving 3 = a(0). - Benoit Cloitre, Sep 15 2002 [edited by Daniel Forgues, Jun 20 2011]
The above formula implies that the Fermat numbers (being all odd) are coprime.
Conjecture: F is a Fermat prime if and only if phi(F-2) = (F-1)/2. - Benoit Cloitre, Sep 15 2002
A000120(a(n)) = 2. - Reinhard Zumkeller, Aug 07 2010
If a(n) is composite, then a(n) = A242619(n)^2 + A242620(n)^2 = A257916(n)^2 - A257917(n)^2. - Arkadiusz Wesolowski, May 13 2015
Sum_{n>=0} 1/a(n) = A051158. - Amiram Eldar, Oct 27 2020
From Amiram Eldar, Jan 28 2021: (Start)
Product_{n>=0} (1 + 1/a(n)) = A249119.
Product_{n>=0} (1 - 1/a(n)) = 1/2. (End)
a(n) = 2*A077585(n) + 3. - César Aguilera, Jul 26 2023
a(n) = 2*2^A000225(n) + 1. - César Aguilera, Jul 11 2024

A001146 a(n) = 2^(2^n).

Original entry on oeis.org

2, 4, 16, 256, 65536, 4294967296, 18446744073709551616, 340282366920938463463374607431768211456, 115792089237316195423570985008687907853269984665640564039457584007913129639936
Offset: 0

Views

Author

Keywords

Comments

Or, write previous term in base 2, read in base 4.
a(1) = 2, a(n) = smallest power of 2 which does not divide the product of all previous terms.
Number of truth tables generated by Boolean expressions of n variables. - C. Bradford Barber (bradb(AT)shore.net), Dec 27 2005
From Ross Drewe, Feb 13 2008: (Start)
Or, number of distinct n-ary operators in a binary logic. The total number of n-ary operators in a k-valued logic is T = k^(k^n), i.e., if S is a set of k elements, there are T ways of mapping an ordered subset of n elements from S to an element of S. Some operators are "degenerate": the operator has arity p, if only p of the n input values influence the output. Therefore the set of operators can be partitioned into n+1 disjoint subsets representing arities from 0 to n.
For n = 2, k = 2 gives the familiar Boolean operators or functions, C = F(A,B). There are 2^2^2 = 16 operators, composed of: arity 0: 2 operators (C = 0 or 1), arity 1: 4 operators (C = A, B, not(A), not(B)), arity 2: 10 operators (including well-known pairs AND/NAND, OR/NOR, XOR/EQ). (End)
From José María Grau Ribas, Jan 19 2012: (Start)
Or, numbers that can be formed using the number 2, the power operator (^), and parenthesis. (End) [The paper by Guy and Selfridge (see also A003018) shows that this is the same as the current sequence. - N. J. A. Sloane, Jan 21 2012]
a(n) is the highest value k such that A173419(k) = n+1. - Charles R Greathouse IV, Oct 03 2012
Let b(0) = 8 and b(n+1) = the smallest number not in the sequence such that b(n+1) - Product_{i=0..n} b(i) divides b(n+1)*Product_{i=0..n} b(i). Then b(n) = a(n) for n > 0. - Derek Orr, Jan 15 2015
Twice the number of distinct minimal toss sequences of a coin to obtain all sequences of length n, which is 2^(2^n-1). This derives from the 2^n ways to cut each of the de Bruijn sequences B(2,n). - Maurizio De Leo, Feb 28 2015
I conjecture that { a(n) ; n>1 } are the numbers such that n^4-1 divides 2^n-1, intersection of A247219 and A247165. - M. F. Hasler, Jul 25 2015
Erdős has shown that it is an irrationality sequence (see Guy reference). - Stefano Spezia, Oct 13 2024

References

  • R. K. Guy, Unsolved Problems in Number Theory, Springer, 1st edition, 1981. See section E24.
  • D. E. Knuth, The Art of Computer Programming, Vol. 4A, Section 7.1.1, p. 79.
  • 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).

Crossrefs

Programs

Formula

a(n+1) = (a(n))^2.
1 = Sum_{n>=0} a(n)/A051179(n+1) = 2/3 + 4/15 + 16/255 + 256/65535, ..., with partial sums: 2/3, 14/15, 254/255, 65534/65535, ... - Gary W. Adamson, Jun 15 2003
a(n) = A000079(A000079(n)). - Robert Israel, Jan 15 2015
Sum_{n>=0} 1/a(n) = A007404. - Amiram Eldar, Oct 14 2020
From Amiram Eldar, Jan 28 2021: (Start)
Product_{n>=0} (1 + 1/a(n)) = 2.
Product_{n>=0} (1 - 1/a(n)) = A215016. (End)

A001274 Numbers k such that phi(k) = phi(k+1).

Original entry on oeis.org

1, 3, 15, 104, 164, 194, 255, 495, 584, 975, 2204, 2625, 2834, 3255, 3705, 5186, 5187, 10604, 11715, 13365, 18315, 22935, 25545, 32864, 38804, 39524, 46215, 48704, 49215, 49335, 56864, 57584, 57645, 64004, 65535, 73124, 105524, 107864, 123824, 131144, 164175, 184635
Offset: 1

Views

Author

Keywords

Comments

Unlike totients, cototient(x + 1) = cototient(x) never holds (except 2 - phi(2) = 3 - phi(3) = 1) because cototient(x) is congruent to x modulo 2. - Labos Elemer, Aug 08 2001
Lal-Gillard and Firoozbakht ask whether there is another pair of consecutive integers in this sequence, apart from a(16) + 1 = a(17) = 5187, see link. - M. F. Hasler, Jan 05 2011
There are 5236 terms less than 10^12. - Jud McCranie, Feb 13 2012
Up to 10^13 there are 10755 terms, and no further consecutive pairs like (5186, 5187). - Giovanni Resta, Feb 27 2014
A051179(k) for k from 0 to 5 are in the sequence. No other members of A051179 are in the sequence, because phi(2^(2^k)-1) = Product_{j=1..k-1} phi(2^(2^j)+1) and phi(2^(2^5)+1) < 2^(2^5) so if k > 5, phi(2^(2^k)-1) < Product_{j=1..k-1} 2^(2^j) = 2^(2^k-1) = phi(2^(2^k)). - Robert Israel, Mar 31 2015
Number of terms < 10^k, k=1,2,3,...: 2, 3, 10, 17, 36, 68, 142, 306, 651, 1267, 2567, 5236, 10755, ..., . - Robert G. Wilson v, Apr 10 2019
Conjecture: Except for the first two terms, all terms are composite and congruent to either 2 or 3 (mod 6). - Robert G. Wilson v, Apr 10 2019
Paul Kinlaw has noticed that up to 10^13 the only counterexample to the above conjecture is a(7424) = 3044760173455. - Giovanni Resta, May 23 2019

Examples

			phi(3) = phi(4) = 2, so 3 is in the sequence.
phi(15) = phi(16) = 8, so 15 is in the sequence.
		

References

  • J.-M. De Koninck, Ces nombres qui nous fascinent, Entry 15, pp 5, Ellipses, Paris 2008.
  • R. K. Guy, Unsolved Problems Number Theory, Sect. B36.
  • 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).

Crossrefs

Programs

  • Haskell
    import Data.List (elemIndices)
    a001274 n = a001274_list !! (n-1)
    a001274_list = map (+ 1) $ elemIndices 0 $
                               zipWith (-) (tail a000010_list) a000010_list
    -- Reinhard Zumkeller, May 20 2014, Mar 31 2011
    
  • Magma
    [n: n in [1..3*10^5] | EulerPhi(n) eq EulerPhi(n+1)]; // Vincenzo Librandi, Apr 14 2015
  • Maple
    select(n -> numtheory:-phi(n) = numtheory:-phi(n+1), [$1..10^5]); # Robert Israel, Mar 31 2015
  • Mathematica
    Reap[For[n = 1; k = 2; f1 = 1, k <= 10^9, k++, f2 = EulerPhi[k]; If[f1 == f2, Print["a(", n, ") = ", k - 1]; Sow[k - 1]; n++]; f1 = f2]][[2, 1]] (* Jean-François Alcover, Mar 29 2011, revised Dec 26 2013 *)
    Flatten[Position[Partition[EulerPhi[Range[200000]],2,1],{x_,x_}]] (* Harvey P. Dale, Dec 27 2015 *)
    Select[Range[1000], EulerPhi[#] == EulerPhi[# + 1] &] (* Alonso del Arte, Oct 03 2014 *)
    SequencePosition[EulerPhi[Range[200000]],{x_,x_}][[All,1]] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, May 01 2018 *)
    k = 8; lst = {1, 3}; While[k < 200000, If[ !PrimeQ[k +1], ep = EulerPhi[k +1]; If[ EulerPhi[k] == ep, AppendTo[lst, k]]; If[ep == EulerPhi[k +2], AppendTo[lst, k +1]]]; k += 6]; lst (* Robert G. Wilson v, Apr 10 2019 *)
  • PARI
    is(n)=eulerphi(n)==eulerphi(n+1) \\ Charles R Greathouse IV, Feb 27 2014
    
  • PARI
    list(lim)=my(v=List(),old=1); forfactored(n=2,lim\1+1, my(new=eulerphi(n)); if(old==new, listput(v,n[1]-1)); old=new); Vec(v) \\ Charles R Greathouse IV, Jul 17 2022
    

Formula

Conjecture: a(n) ~ C*n^3*log(n), where C = 9/Pi^2 = 0.91189... - Thomas Ordowski, Oct 21 2014
Sum_{n>=1} 1/a(n) is in the interval (1.4324884, 7.8358) (Kinlaw et al., 2020; an upper bound 441702 was given by Bayless and Kinlaw, 2016). - Amiram Eldar, Oct 15 2020

Extensions

More terms from David W. Wilson

A082897 Perfect totient numbers.

Original entry on oeis.org

3, 9, 15, 27, 39, 81, 111, 183, 243, 255, 327, 363, 471, 729, 2187, 2199, 3063, 4359, 4375, 5571, 6561, 8751, 15723, 19683, 36759, 46791, 59049, 65535, 140103, 177147, 208191, 441027, 531441, 1594323, 4190263, 4782969, 9056583, 14348907, 43046721
Offset: 1

Views

Author

Douglas E. Iannucci, Jul 21 2003

Keywords

Comments

It is trivial that perfect totient numbers must be odd. It is easy to show that powers of 3 are perfect totient numbers.
The product of the first n Fermat primes (A019434) is also a perfect totient number. There are 57 terms under 10^11. - Jud McCranie, Feb 24 2012
Terms 15, 255, 65535 and 4294967295 also belong to A051179 (see Theorem 4 in Loomis link). - Michel Marcus, Mar 19 2014
For the first 64 terms, a(n) is approximately 1.56^n. - Jud McCranie, Jun 17 2017
These numbers were first studied in 1939 by the Spanish mathematician Laureano Pérez-Cacho Villaverde (1900-1957). The term "perfect totient number" was coined by Venkataraman (1975). - Amiram Eldar, Mar 10 2021

Examples

			327 is a perfect totient number because 327 = 216 + 72 + 24 + 8 + 4 + 2 + 1. Note that 216 = phi(327), 72 = phi(216), 24 = phi(72) and so on.
		

References

  • Richard K. Guy, Unsolved Problems in Number Theory, 3rd Edition, Springer, 2004, Section B41, pp. 147-150.
  • L. Pérez-Cacho, Sobre la suma de indicadores de órdenes sucesivos (in Spanish), Revista Matematica Hispano-Americana, Vol.5, No. 3 (1939), pp. 45-50.
  • József Sándor and Borislav Crstici, Handbook of Number theory II, Kluwer Academic Publishers, 2004, Chapter 3, pp. 240-242.
  • D. L. Silverman, Problem 1040, J. Recr. Math., Vol. 14 (1982); Solution by R. I. Hess, ibid., Vol. 15 (1983).

Crossrefs

Cf. A092693 (sum of iterated phi(n)). See also A091847.

Programs

  • Maple
    with(numtheory):
    A082897_list := proc(N) local k,p,n,L;
    L := NULL;
    for n from 3 by 2 to N do
    k := 0; p := phi(n);
    while 1 < p do k := k + p; p := phi(p) od;
    if k + 1 = n then L := L,n fi
    od; L end: # Peter Luschny, Nov 01 2010
  • Mathematica
    kMax = 57395631; a = Table[0, {kMax}]; PTNs = {}; Do[e = EulerPhi[k]; a[[k]] = e + a[[e]]; If[k == a[[k]], AppendTo[PTNs, k]], {k, 2, kMax}]; PTNs
    perfTotQ[n_] := Plus @@ FixedPointList[ EulerPhi@ # &, n] == 2n + 1; Select[Range[1000], perfTotQ] (* Robert G. Wilson v, Nov 06 2010 *)
  • PARI
    S(n)={n=eulerphi(n);if(n==1,1,n+S(n))}
    for(n=2,1e3,if(S(n)==n,print1(n", "))) \\ Charles R Greathouse IV, Mar 29 2012; Corrected by Dana Jacobsen, Dec 16 2018
    
  • Perl
    use ntheory "euler_phi"; sub S { my $n=euler_phi(shift); return 1 if $n == 1; $n+S($n); }   for (2..1e4) { say if $==S($); } # Dana Jacobsen, Dec 16 2018
    
  • Python
    from itertools import count, islice
    from gmpy2 import digits
    from sympy import totient
    def A082897_gen(startvalue=3): # generator of terms >= startvalue
        for n in count((k:=max(startvalue,3))+1-(k&1),2):
            t = digits(n,3)
            if t.count('0') == len(t)-1:
                yield n
            else:
                m, s = n, 1
                while (m:=totient(m))>1:
                    s += m
                if s == n:
                    yield n
    A082897_list = list(islice(A082897_gen(),20)) # Chai Wah Wu, Mar 24 2023

Formula

n is a perfect totient number if S(n) = n, where S(n) = phi(n) + phi^2(n) + ... + 1, where phi is Euler's totient function and phi^2(n) = phi(phi(n)), ..., phi^k(n) = phi(phi^(k-1)(n)).
n such that n = A092693(n).
n such that 2n = A053478(n). - Vladeta Jovovic, Jul 02 2004
n log log log log n << a(n) <= 3^n. - Charles R Greathouse IV, Mar 22 2012

Extensions

Corrected by T. D. Noe, Mar 11 2004

A135764 Distribute the natural numbers in columns based on the occurrence of "2" in each prime factorization; square array A(row,col) = 2^(row-1) * ((2*col)-1), read by descending antidiagonals.

Original entry on oeis.org

1, 3, 2, 5, 6, 4, 7, 10, 12, 8, 9, 14, 20, 24, 16, 11, 18, 28, 40, 48, 32, 13, 22, 36, 56, 80, 96, 64, 15, 26, 44, 72, 112, 160, 192, 128, 17, 30, 52, 88, 144, 224, 320, 384, 256, 19, 34, 60, 104, 176, 288, 448, 640, 768, 512, 21, 38, 68, 120, 208, 352, 576, 896, 1280, 1536, 1024, 23, 42, 76, 136, 240, 416, 704, 1152, 1792, 2560, 3072, 2048, 25, 46, 84, 152, 272, 480, 832, 1408, 2304, 3584, 5120, 6144, 4096, 27, 50, 92, 168, 304, 544, 960, 1664, 2816
Offset: 1

Views

Author

Alford Arnold, Nov 29 2007

Keywords

Comments

The array in A135764 is identical to the array in A054582 [up to the transposition and different indexing. - Clark Kimberling, Dec 03 2010; comment amended by Antti Karttunen, Feb 03 2015; please see the illustration in Example section].
The array gives a bijection between the natural numbers N and N^2. A more usual bijection is to take the natural numbers A000027 and write them in the usual OEIS square array format. However this bijection has the advantage that it can be formed by iterating the usual bijection between N and 2N. - Joshua Zucker, Nov 04 2011
The array can be used to determine the configurations of k-th Towers of Hanoi moves, by labeling odd row terms C,B,A,C,B,A,... and even row terms B,C,A,B,C,A,.... Then given k equal to or greater than term "a" in each n-th row, but less than the next row term, record the label A, B, or C for term "a". This denotes the peg position for the disc corresponding to the n-th row. For example, with k = 25, five discs are in motion since the binary for 25 = 11001, five bits. We find that 25 in row 5 is greater than 16 labeled C, but less than 48. Thus, disc 5 is on peg C. In the 4th row, 25 is greater than 24 (a C), but less than 40, so goes onto the C peg. Similarly, disc 3 is on A, 2 is on A, and disc 1 is on A. Thus, discs 2 and 3 are on peg A, while 1, 4, and 5 are on peg C. - Gary W. Adamson, Jun 22 2012
Shares with arrays A253551 and A254053 the property that A001511(n) = k for all terms n on row k and when going downward in each column, terms grow by doubling. - Antti Karttunen, Feb 03 2015
Let P be the infinite palindromic word having initial word 0 and midword sequence (1,2,3,4,...) = A000027. Row n of the array A135764 gives the positions of n-1 in S. ("Infinite palindromic word" is defined at A260390.) - Clark Kimberling, Aug 13 2015
The probability distribution series 1 = 2/3 + 4/15 + 16/255 + 256/65535 + ... + A001146(n-1)/A051179(n) governs the proportions of terms in A001511 from row n of the array. In A001511(1..15) there are ((2/3) * 15) = ten terms from row one of the array, ((4/15) * 15) = four terms from row two, and ((16/255) * 15) = one (rounded), giving one term from row three (a 4). - Gary W. Adamson, Dec 16 2021
From Gary W. Adamson, Dec 30 2021: (Start)
Subarrays representing the number of divisors of an integer can be mapped on the table. For 60, write the odd divisors on the top row: 1, 3, 5, 15. Since 60 has 12 divisors, let the left column equal 1, 2, 4, where 4 is the highest power of 2 dividing 60. Multiplying top row terms by left column terms, we get the result:
1 3 5 15
2 6 10 30
4 12 20 60. (End)

Examples

			The table begins
   1,  3,   5,   7,   9,  11,  13,  15,  17,  19,  21,  23, ...
   2,  6,  10,  14,  18,  22,  26,  30,  34,  38,  42,  46, ...
   4, 12,  20,  28,  36,  44,  52,  60,  68,  76,  84,  92, ...
   8, 24,  40,  56,  72,  88, 104, 120, 136, 152, 168, 184, ...
  16, 48,  80, 112, 144, 176, 208, 240, 272, 304, 336, 368, ...
  32, 96, 160, 224, 288, 352, 416, 480, 544, 608, 672, 736, ...
etc.
For n = 6, we have [A002260(6), A004736(6)] = [3, 1] (i.e., 6 corresponds to location 3,1 (row,col) in above table) and A(3,1) = A000079(3-1) * A005408(1-1) = 2^2 * 1 = 4.
For n = 13, we have [A002260(13), A004736(13)] = [3, 3] (13 corresponds to location 3,3 (row,col) in above table) and A(3,3) = A000079(3-1) * A005408(3-1) = 2^2 * 5 = 20.
For n = 23, we have [A002260(23), A004736(23)] = [2, 6] (23 corresponds to location 2,6) and A(2,6) = A000079(2-1) * A005408(6-1) = 2^1 * 11 = 22.
		

Crossrefs

Transpose: A054582.
Inverse permutation: A249725.
Column 1: A000079.
Row 1: A005408.
Cf. A001511 (row index), A003602 (column index, both one-based).
Related arrays: A135765, A253551, A254053, A254055.
Cf. also permutations A246675, A246676, A249741, A249811, A249812.
Cf. A260390.

Programs

  • Maple
    seq(seq(2^(j-1)*(2*(i-j)+1),j=1..i),i=1..20); # Robert Israel, Feb 03 2015
  • Mathematica
    f[n_] := Block[{i, j}, {1}~Join~Flatten@ Last@ Reap@ For[j = 1, j <= n, For[i = j, i > 0, Sow[2^(j - i - 1)*(2 i + 1)], i--], j++]]; f@ 10 (* Michael De Vlieger, Feb 03 2015 *)
  • PARI
    a(n) = {s = ceil((1 + sqrt(1 + 8*n)) / 2); r = n - binomial(s-1, 2) - 1;k = s - r - 2; 2^r * (2 * k + 1) } \\ David A. Corneth, Feb 05 2015
  • Scheme
    (define (A135764 n) (A135764bi (A002260 n) (A004736 n)))
    (define (A135764bi row col) (* (A000079 (- row 1)) (+ -1 col col)))
    ;; Antti Karttunen, Feb 03 2015
    

Formula

From Antti Karttunen, Feb 03 2015: (Start)
A(row, col) = 2^(row-1) * ((2*col)-1) = A000079(row-1) * A005408(col-1).
A(row,col) = A064989(A135765(row,A249746(col))).
A(row,col) = A(row+1,col)/2 [discarding the topmost row and halving the rest of terms gives the array back].
A(row,col) = A(row,col+1) - A000079(row) [discarding the leftmost column and subtracting 2^{row number} from the rest of terms gives the array back].
(End)
G.f.: ((2*x+1)*Sum_{i>=0} 2^i*x^(i*(i+1)/2) + 2*(1-2*x)*Sum_{i>=0} i*x^(i*(i+1)/2) + (1-6*x)*Sum_{i>=0} x^(i*(i+1)/2) - 1 - 2*x)*x/(1-2*x)^2. These sums are related to Jacobi theta functions. - Robert Israel, Feb 03 2015

Extensions

More terms from Sean A. Irvine, Nov 23 2010
Name amended and the illustration of array in the example section transposed by Antti Karttunen, Feb 03 2015

A075101 Numerator of 2^n/n.

Original entry on oeis.org

2, 2, 8, 4, 32, 32, 128, 32, 512, 512, 2048, 1024, 8192, 8192, 32768, 4096, 131072, 131072, 524288, 262144, 2097152, 2097152, 8388608, 2097152, 33554432, 33554432, 134217728, 67108864, 536870912, 536870912, 2147483648, 134217728, 8589934592, 8589934592, 34359738368, 17179869184, 137438953472
Offset: 1

Views

Author

Reinhard Zumkeller, Sep 01 2002

Keywords

Crossrefs

Denominator is A000265(n).

Programs

  • Magma
    [Numerator(2^n/n): n in [1..50]]; // G. C. Greubel, Feb 28 2019
    
  • Maple
    [seq(numer(2^n/n),n=1..50)];
  • Mathematica
    f[n_]:=Numerator[2^n/n]; Array[f,50] (* Vladimir Joseph Stephan Orlovsky, Feb 16 2011 *)
  • PARI
    a(n) = numerator(2^n/n); \\ Michel Marcus, Mar 25 2018
    
  • PARI
    a(n) = 2^(n - valuation(n, 2)) \\ Jianing Song, Oct 24 2018
    
  • Python
    from fractions import Fraction
    def A075101(n):
        return (Fraction(2**n)/n).numerator # Chai Wah Wu, Mar 25 2018
    
  • Sage
    [numerator(2^n/n) for n in (1..50)] # G. C. Greubel, Feb 28 2019

Formula

a(n) = 2^(n - A007814(n)).
a(n) = 2*A084623(n). - Paul Curtz, Jan 28 2013
a(n) = 2^A093048(n). - Paul Curtz, Jun 10 2016
From Peter Bala, Feb 25 2019: (Start)
a(n) = 2^n/gcd(n,2^n).
O.g.f.: F(2*x) - (1/2)*F((2*x)^2) - (1/4)*F((2*x)^4) - (1/8)*F((2*x)^8) - ..., where F(x) = x/(1 - x). Cf. A000265.
O.g.f. for reciprocals: Sum_{n >= 1} x^n/a(n) = F((x/2)) + F((x/2)^2) + 2*F((x/2)^4) + 4*F((x/2)^8) + 8*F((x/2)^16) + 16*F((x/2)^32) + .... (End)
Sum_{n>=1} 1/a(n) = Sum_{n>=1} 2^(2^(n-1)+n-1)/(2^(2^n) - 1) = Sum_{n>=1} A073113(n-1)/A051179(n) = 1.48247501707... - Amiram Eldar, Aug 14 2022
Showing 1-10 of 43 results. Next