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.

Previous Showing 41-50 of 86 results. Next

A059387 Jordan function J_n(6) (see A059379).

Original entry on oeis.org

0, 2, 24, 182, 1200, 7502, 45864, 277622, 1672800, 10057502, 60406104, 362617862, 2176246800, 13059091502, 78359364744, 470170602902, 2821066795200, 16926530173502, 101559568985784, 609358577224742, 3656154952230000
Offset: 0

Views

Author

N. J. A. Sloane, Jan 29 2001

Keywords

Comments

a(n) = A000225(n) * A024023(n) = (2^n - 1) * (3^n - 1) . a(n) is the number of n-tuples of elements e_1,e_2,...,e_n in the cyclic group C_6 such that the subgroup generated by e_1,e_2,...,e_n is C_6. - Sharon Sela (sharonsela(AT)hotmail.com), Jun 02 2002
Szalay proves that this sequence contains no squares except for 0. He & Liu prove that this sequence contains no higher powers aside from 2. - Charles R Greathouse IV, Jan 10 2025

References

  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 199, #3.

Crossrefs

Programs

Formula

G.f.: -2*x*(6*x^2-1) / ((x-1)*(2*x-1)*(3*x-1)*(6*x-1)). - Colin Barker, Dec 06 2012
a(n-1) = (limit of (Sum_{k>=0} (1/(6*k + 1)^s - 1/(6*k + 2)^s - 2/(6*k + 3)^s - 1/(6*k + 4)^s + 1/(6*k + 5)^s + 2/(6*k + 6)^s) as s -> n))/zeta(n)*6^(n - 1). - Mats Granvik, Nov 14 2013
a(n) = 2*A160869(n). - R. J. Mathar, Nov 23 2018

A059409 a(n) = 4^n * (2^n - 1).

Original entry on oeis.org

0, 4, 48, 448, 3840, 31744, 258048, 2080768, 16711680, 133955584, 1072693248, 8585740288, 68702699520, 549688705024, 4397778075648, 35183298347008, 281470681743360, 2251782633816064, 18014329790005248, 144114913197948928, 1152920405095219200
Offset: 0

Views

Author

Keywords

Comments

Jordan's totient functions are described more fully in A059379 and A059380; for example, J_1(n) is Euler's totient function and J_2(n) the Moebius transform of squares.

Examples

			(4,48,448,3840,...) = (8,64,512,4096,...) - (2,12,56,240,...) - (1,3,7,15,...) - (1,1,1,1,...)
		

References

  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 199, #3.

Crossrefs

Programs

Formula

Equals J_n(8) (see A059379).
J_n(8) = 8^n - A024023(n) - A000225(n) - A000012(n).
a(n) = 4*A016152(n).
G.f.: 4*x / ( (8*x-1)*(4*x-1) ). - R. J. Mathar, Nov 23 2018
Sum_{n>0} 1/a(n) = E - 4/3, where E is the Erdős-Borwein constant (A065442). - Peter McNair, Dec 19 2022
a(n) = A291779(A008585(n)) = A045991(A000079(n)). - Mathew Englander, Feb 08 2024

A059410 J_n(9) (see A059379).

Original entry on oeis.org

0, 6, 72, 702, 6480, 58806, 530712, 4780782, 43040160, 387400806, 3486725352, 31380882462, 282429005040, 2541864234006, 22876787671992, 205891117745742, 1853020145805120, 16677181570526406, 150094634909578632, 1350851716510730622, 12157665455570144400, 109418989121052006006
Offset: 0

Views

Author

N. J. A. Sloane, Jan 30 2001

Keywords

References

  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 199, #3.

Crossrefs

Programs

Formula

a(n) = 9^n - 3^n; a(n) = 12*a(n-1) - 27*a(n-2) for n > 1. - Vincenzo Librandi, Jun 03 2011
From Vincenzo Librandi, Oct 04 2014: (Start)
a(n) = 3^n*(3^n-1) = A000244(n)*A024023(n).
G.f.: 6*x/((1-3*x)*(1-9*x)). (End)
a(n) = 6*A016142(n). - R. J. Mathar, Nov 23 2018
E.g.f.: 2*exp(6*x)*sinh(3*x). - Elmo R. Oliveira, Mar 31 2025

A079004 Least x>=3 such that F(x)==1 (mod 3^n) where F(x) denotes the x-th Fibonacci number (A000045).

Original entry on oeis.org

7, 10, 10, 34, 106, 322, 970, 2914, 8746, 26242, 78730, 236194, 708586, 2125762, 6377290, 19131874, 57395626, 172186882, 516560650, 1549681954, 4649045866, 13947137602, 41841412810, 125524238434, 376572715306, 1129718145922
Offset: 1

Views

Author

Benoit Cloitre, Feb 01 2003

Keywords

References

  • R. L. Graham, D. E. Knuth and O. Patashnick, "Concrete Mathematics", second edition, Addison Wesley, ex. 6.59.

Crossrefs

Programs

  • Maple
    7, 10, seq(4*3^(n-2)-2,n=3..50); # Robert Israel, Jan 15 2015
  • Mathematica
    a=2;lst={7,10};Do[a=a*3+4;AppendTo[lst,a],{n,0,5!}];lst (* Vladimir Joseph Stephan Orlovsky, Dec 25 2008 *)
    LinearRecurrence[{4,-3},{7,10,10,34},40] (* Harvey P. Dale, Aug 16 2024 *)
  • PARI
    a(n)=if(n<0,0,x=3; while((fibonacci(x)-1)%(3^n)>0,x++); x)

Formula

a(1)=7, a(2)=10, a(3)=10; for n>3, a(n) = 3*a(n-1) + 4.
a(n) = 4*3^(n-2)-2 for n >= 3.
G.f.: 8*x^2+(23/3)*x+14/9+2/(x-1)-4/(9*(3*x-1)). - Robert Israel, Jan 15 2015

Extensions

Formula corrected by Robert Israel, Jan 15 2015

A132753 a(n) = 2^(n+1) - n + 1.

Original entry on oeis.org

3, 4, 7, 14, 29, 60, 123, 250, 505, 1016, 2039, 4086, 8181, 16372, 32755, 65522, 131057, 262128, 524271, 1048558, 2097133, 4194284, 8388587, 16777194, 33554409, 67108840, 134217703, 268435430, 536870885, 1073741796, 2147483619
Offset: 0

Views

Author

Gary W. Adamson, Aug 28 2007

Keywords

Comments

Apart from a(0): Row sums of triangle A132752 (old name).
Apart from a(0): Binomial transform of [1, 3, 0, 4, 0, 4, 0, 4, ...].

Examples

			a(3) = 14 = sum of row 3 terms of triangle A132752: (3 + 5 + 5 + 1).
a(3) = 14 = (1, 3, 3, 1) dot (1, 3, 0, 4) = (1 + 9 + 0 + 4).
		

Crossrefs

Programs

  • Magma
    [2^(n+1) -n+1: n in [0..40]]; // G. C. Greubel, Feb 16 2021
  • Maple
    A132753:= n-> 2^(n+1) -n+1; seq(A132753(n), n=0..40) # G. C. Greubel, Feb 16 2021
  • Mathematica
    Table[2^(n+1) -n+1, {n, 0, 30}] (* Bruno Berselli, Aug 31 2013 *)
  • PARI
    a(n)=2^(n+1)-n+1
    
  • PARI
    Vec( (3-8*x+6*x^2)/((1-x)^2*(1-2*x)) + O(x^40)) \\ Colin Barker, Mar 14 2014
    
  • Sage
    [2^(n+1) -n+1 for n in (0..40)] # G. C. Greubel, Feb 16 2021
    

Formula

From Colin Barker, Mar 14 2014: (Start)
a(n) = 4*a(n-1) - 5*a(n-2) + 2*a(n-3).
G.f.: (3 - 8*x + 6*x^2)/((1-x)^2 * (1-2*x)). (End)
E.g.f.: (1-x)*exp(x) + 2*exp(2*x). - G. C. Greubel, Feb 16 2021

Extensions

More terms Vladimir Joseph Stephan Orlovsky, Dec 25 2008
Changed first member, and better name from Ralf Stephan, Aug 31 2013

A213215 For the Collatz (3x+1) iterations starting with the odd numbers k, a(n) is the smallest k such that the trajectory contains at least n successive odd numbers == 3 (mod 4).

Original entry on oeis.org

1, 3, 7, 15, 27, 27, 127, 255, 511, 1023, 1819, 4095, 4255, 16383, 32767, 65535, 77671, 262143, 459759, 1048575, 2097151, 4194303, 7456539, 16777215, 33554431, 67108863, 125687199, 125687199, 125687199, 1073741823, 2147483647, 4294967295, 8589934591, 17179869183
Offset: 1

Views

Author

Michel Lagneau, Mar 02 2013

Keywords

Comments

The count of odd numbers includes the starting number n if it is part of the longest chain of odd numbers in the sequence.
The sequence is infinite because the Collatz trajectory starting at k = 2^n - 1 contains at least n consecutive odd numbers == 3 (mod 4) such that 3*2^n - 1 -> 3^2*2^(n-1)-1 -> ... -> 2*3^(n-1)-1 and then -> 3^n-1 -> ... but the numbers of this sequence are not always of this form, for example 27, 1819, 4255, 77671, 459759, ...
Equivalently, a(n) is the smallest k such that the Collatz sequence for k suffers at least n consecutive (3x+1)/2 operations (i.e., no consecutive divisions by 2). - Kevin P. Thompson, Dec 15 2021

Examples

			a(4)=15 because the Collatz sequence for 15 (15, 46, 23, 70, 35, 106, 53, 160, 80, 40, 20, 10, 5, 16, 8, 4, 2, 1) is the first Collatz sequence to contain 4 consecutive odd numbers congruent to 3 (mod 4): 15, 23, 35, and 53.
		

Crossrefs

Cf. A222598 (similar).

Programs

  • Maple
    nn:=200:T:=array(1..nn):
    for n from 1 to 20 do:jj:=0:
             for m from 3 by 2 to 10^8 while(jj=0) do:
                   for i from 1 to nn while(jj=0) do:
                   T[i]:=0:od:a:=1:T[1]:=m:x:=m:
                         for it from 1 to 100 while (x>1) do:
                             if irem(x,2)=0 then
                             x := x/2:a:=a+1:T[a]:=x:
                             else
                             x := 3*x+1: a := a+1: T[a]:=x:
                            fi:
                         od:
                         jj:=0:aa:=a:
                           for j from 1 to aa while(jj=0) do:
                             if irem(T[j],4)=3 then
                             T[j]:=1:
                             else
                             T[j]:=0:
                           fi:
                          od:
                             for p from 0 to aa-1 while (jj=0) do:
                             s:=sum(T[p+k],k=1..2*n):
                             if s=n then
                             jj:=1: printf ( "%d %d \n",n,m):
                             else
                             fi:
                      od:
                  od:
               od:
  • Mathematica
    Collatz[n_] := NestWhileList[If[EvenQ[#], #/2, 3 # + 1] &, n, # > 1 &]; countThrees[t_] := Module[{mx = 0, cnt = 0, i = 0}, While[i < Length[t], i++; If[t[[i]] == 3, cnt++; i++, If[cnt > mx, mx = cnt]; cnt = 0]]; mx]; nn = 15; t = Table[0, {nn}]; n = 1; While[Min[t] == 0, n = n + 2; c = countThrees[Mod[Collatz[n], 4]]; If[c <= nn && t[[c]] == 0, t[[c]] = n; Do[If[t[[i]] == 0, t[[i]] = n], {i, c}]]]; t (* T. D. Noe, Mar 02 2013 *)

Extensions

Definition clarified, a(1) inserted, and a(21)-a(34) added by Kevin P. Thompson, Dec 15 2021

A225569 Decimal expansion of Sum_{n>=0} 1/10^(3^n), a transcendental number.

Original entry on oeis.org

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

Views

Author

Jean-François Alcover, Jul 29 2013

Keywords

Comments

According to the Thue-Siegel-Roth theorem, this number is transcendental.
As a sequence, characteristic sequence for powers of 3. - Franklin T. Adams-Watters, Aug 07 2013
Actually, characteristic function for 3^k - 1 (A024023), with the current starting offset 0. - Antti Karttunen, Nov 19 2017

Examples

			0.101000001000000000000000001000000000000000000000000000000000000000000000000000001...
		

References

  • Steven R. Finch, Mathematical Constants, Cambridge University Press, 2003, p. 171.

Crossrefs

Programs

  • Mathematica
    (* n = 4 is sufficient to get 100 digits *) Sum[1/10^(3^n), {n, 0, 4}] // RealDigits[#, 10, 100]& // First
  • PARI
    a(n) = if(n+1 == 3^valuation(n+1, 3), 1, 0); \\ Amiram Eldar, Nov 02 2023

Formula

From Antti Karttunen, Nov 19 2017: (Start)
a(n) = A063524(A053735(1+n)).
a(n) = abs(A154271(1+n)). (End)
From Amiram Eldar, Nov 02 2023: (Start)
With offset 1:
Completely multiplicative with a(3^e) = 1, and a(p^e) = 0 for p != 3.
Dirichlet g.f.: 1/(1-3^(-s)). (End)

A249025 Numbers k such that 3^k - 1 is not squarefree.

Original entry on oeis.org

2, 4, 5, 6, 8, 10, 12, 14, 15, 16, 18, 20, 22, 24, 25, 26, 28, 30, 32, 34, 35, 36, 38, 39, 40, 42, 44, 45, 46, 48, 50, 52, 54, 55, 56, 58, 60, 62, 64, 65, 66, 68, 70, 72, 74, 75, 76, 78, 80, 82, 84, 85, 86, 88, 90, 92, 94, 95, 96, 98, 100, 102, 104, 105, 106
Offset: 1

Views

Author

Felix Fröhlich, Oct 19 2014

Keywords

Comments

All even numbers are present (odd square - 1 == 0 mod 4). All multiples of 5 are present, since we can factorize 3^5k - 1 as (3^5-1)*[3^5(k-1) + ... + 1], and 3^5-1=121. Similarly all multiples of 39 are present since 3^39-1 = 405255515301=3^2*7*13^2*41^2*22643. - Jon Perry, Nov 09 2014
All multiples of positive members of A283620. - Robert Israel, Mar 16 2017

Crossrefs

Programs

  • Magma
    [n: n in [1..110]| not IsSquarefree(3^n-1)]; // Vincenzo Librandi, Oct 25 2014
  • Maple
    select(t -> igcd(t,10) > 1 or not numtheory:-issqrfree(3^t-1), [$1..150]); # Robert Israel, Mar 16 2017
  • Mathematica
    Select[Range[120], ! SquareFreeQ[3^# - 1] &] (* Vincenzo Librandi, Oct 25 2014 *)
  • PARI
    for(k=1, 1e3, if(!issquarefree(3^k-1), print1(k, ", ")))
    

Formula

A107078(A024023(n)) --> a(n) = log_3(A024023(n)).

A295515 The Euclid tree, read across levels.

Original entry on oeis.org

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

Views

Author

Peter Luschny, Nov 25 2017

Keywords

Comments

Set N(x) = 1 + floor(x) - frac(x) and let '"' denote the ditto operator, referring to the previously computed expression. Assume the first expression is '0'. Then [0, repeat(N("))] will generate the natural numbers 0, 1, 2, 3, ... and [0, repeat(1/N("))] will generate the rational numbers 0/1, 1/1, 1/2, 2/1, 1/3, 3/2, ... Every reduced nonnegative rational number r appears exactly once in this list as a relatively prime pair [n, d] = r = n/d. We list numerator and denominator one after the other in the sequence.
The apt name 'Euclid tree' is taken from the exposition of Malter, Schleicher and Don Zagier. It is sometimes called the Calkin-Wilf tree. The enumeration is based on Stern's diatomic series (which is a subsequence) and computed by a modification of Dijkstra's 'fusc' function.
The tree listed has root 0, the variant with root 1 is more widely used. Seen as sequences the difference between the two trees is trivial: it is enough to leave out the first two terms; but as trees they are markedly different (see the example section).

Examples

			The tree with root 0 starts:
                                      [0/1]
                  [1/1,                                    1/2]
        [2/1,                1/3,                3/2,                2/3]
   [3/1,      1/4,      4/3,      3/5,      5/2,      2/5,      5/3,      3/4]
[4/1, 1/5, 5/4, 4/7, 7/3, 3/8, 8/5, 5/7, 7/2, 2/7, 7/5, 5/8, 8/3, 3/7, 7/4, 4/5]
.
The tree with root 1 starts:
                                      [1/1]
                  [1/2,                                    2/1]
        [1/3,                3/2,                2/3,                3/1]
   [1/4,      4/3,      3/5,      5/2,      2/5,      5/3,      3/4,      4/1]
[1/5, 5/4, 4/7, 7/3, 3/8, 8/5, 5/7, 7/2, 2/7, 7/5, 5/8, 8/3, 3/7, 7/4, 4/5, 5/1]
		

References

  • M. Aigner and G. M. Ziegler, Proofs from The Book, Springer-Verlag, Berlin, 3rd ed., 2004.

Crossrefs

Cf. A002487, A174981, A294446 (Stern-Brocot tree), A294442 (Kepler's tree), A295511 (Schinzel-Sierpiński tree), A295512 (encoded by semiprimes).

Programs

  • Maple
    # First implementation: use it only if you are not afraid of infinite loops.
    a := x -> 1/(1+floor(x)-frac(x)): 0; do a(%) od;
    # Second implementation:
    lusc := proc(m) local a, b, n; a := 0; b := 1; n := m; while n > 0 do
    if n mod 2 = 1 then b := a + b else a := a + b fi; n := iquo(n, 2) od; a end:
    R := n -> 3*2^(n-1)-1 .. 2^n: # The range of level n.
    EuclidTree_rat := n -> [seq(lusc(k+1)/lusc(k), k=R(n), -1)]:
    EuclidTree_num := n -> [seq(lusc(k+1), k=R(n), -1)]:
    EuclidTree_den := n -> [seq(lusc(k), k=R(n), -1)]:
    EuclidTree_pair := n -> ListTools:-Flatten([seq([lusc(k+1), lusc(k)], k=R(n), -1)]):
    seq(print(EuclidTree_pair(n)), n=1..5);
  • Sage
    def A295515(n):
        if n == 1: return 0
        M = [0, 1]
        for b in (n//2 - 1).bits():
            M[b] = M[0] + M[1]
        return M[1]
    print([A295515(n) for n in (1..85)])

Formula

Some characteristics in comparison to the tree with root 1, seen as a table with T(n,k) for n >= 1 and 1 <= k <= 2^(n-1). Here Tr(n,k), Tp(n,k), Tq(n,k) denotes the fraction r, the numerator of r and the denominator of r in row n and column k respectively.
With root 0: With root 1:
Root Tr(1,1) 0/1 1/1
Tp(n,1) 0,1,2,3,... 1,1,1,1,...
Tp(n,2^(n-1)) 0,1,2,3,... 1,2,3,4,...
Tq(n,1) 1,1,1,1,... 1,2,3,4,...
Tq(n,2^(n-1)) 1,2,3,4,... 1,1,1,1,...
Sum_k Tp(n,k) 0,2,8,26,... A024023 1,3,9,27,... A000244
Sum_k Tq(n,k) 1,3,9,27,... A000244 1,3,9,27,... A000244
Sum_k 2Tr(n,k) 0,3,9,21,... A068156 2,5,11,23,... A083329
Sum_k Tp(n,k)Tq(n,k) 0,3,17,81,... A052913-1 1,4,18,82,... A052913
----
a(n) = A002487(floor(n/2)). - Georg Fischer, Nov 29 2022

A093052 Exponent of 2 in 6^n - 2^n.

Original entry on oeis.org

0, 2, 5, 4, 8, 6, 9, 8, 13, 10, 13, 12, 16, 14, 17, 16, 22, 18, 21, 20, 24, 22, 25, 24, 29, 26, 29, 28, 32, 30, 33, 32, 39, 34, 37, 36, 40, 38, 41, 40, 45, 42, 45, 44, 48, 46, 49, 48, 54, 50, 53, 52, 56, 54, 57, 56, 61, 58, 61, 60, 64, 62, 65, 64, 72, 66, 69, 68, 72
Offset: 0

Views

Author

Ralf Stephan, Mar 16 2004

Keywords

Crossrefs

a(n-1) is the exponent of 2 in A009168(n), A012394(n), A088991(n), A009083(n), A012036(n), A012092(n), A012395(n), A012460(n), A012465(n), A012466(n), A012467(n), (A049294(n)-1)/3.

Programs

  • Mathematica
    Join[{0},Table[IntegerExponent[6^n-2^n,2],{n,70}]] (* Harvey P. Dale, Mar 08 2012 *)
  • PARI
    a(n)=if(n<1,0,if(n%2==0,a(n/2)+2*floor((n+2)/4)+1,n+1))
    
  • Python
    def A093052(n): return n+(~(m:=3**n-1)& m-1).bit_length() if n else 0 # Chai Wah Wu, Jul 07 2022

Formula

Recurrence: a(2n) = a(n) + [(n+1)/2] + 1, a(2n+1) = 2n+2.
a(n) = n + A007814(A024023(n)) = n + A090740(n). - Reinhard Zumkeller, Mar 27 2004
Previous Showing 41-50 of 86 results. Next