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 21-30 of 34 results. Next

A006895 Parenthesized one way gives the powers of 2: (1), (2), (1+3), ..., another way the powers of 3: (1), (2+1), (3+6), ....

Original entry on oeis.org

1, 2, 1, 3, 6, 2, 16, 9, 23, 58, 6, 128, 109, 147, 512, 70, 954, 1233, 815, 4096, 1650, 6542, 13141, 3243, 32768, 23038, 42498, 131072, 3577, 258567, 272874, 251414, 1048576, 294333, 1802819, 2980150, 1214154, 8388608, 4746145, 12031071, 31015650, 2538782
Offset: 0

Views

Author

N. J. A. Sloane, K. S. Brown [ kevin2003(AT)delphi.com ]

Keywords

Comments

Powers of 2 need 1 term or 2 terms parenthesized, whereas powers of 3 need 2 or 3 terms parenthesized, when 3 then the middle term is a power of 2. See A227928. - Reinhard Zumkeller, Oct 09 2013

Examples

			.  a(0)                                              =  _^0
.  a(1)                                              =  2^1
.  a(1) + a(2)            =    2 +   1               =  3^1
.  a(2) + a(3)            =    1 +   3        =    4 =  2^2
.  a(3) + a(4)            =    3 +   6        =    9 =  3^2
.  a(4) + a(5)            =    6 +   2        =    8 =  2^3
.  a(6)                                       =   16 =  2^4
.  a(5) + a(6) + a(7)     =    2 +  16 +   9  =   27 =  3^3
.  a(7) + a(8)            =    9 +  23        =   32 =  2^5
.  a(8) + a(9)            =   23 +  58        =   81 =  3^4
.  a(9) + a(10)           =   58 +   6        =   64 =  2^6
.  a(11)                                      =  128 =  2^7
.  a(10) + a(11) + a(12)  =    6 + 128 + 109  =  243 =  3^5
.  a(12) + a(13)          =  109 + 147        =  256 =  2^8
.  a(14)                                      =  512 =  2^9
.  a(13) + a(14) + a(15)  =  147 + 512 +  70  =  3^6 =  729 .
		

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Haskell
    a006895 n = a006895_list !! n
    a006895_list = 1 : f 0 0 (tail a000079_list) (tail a000244_list) where
       f x y us'@(u:us) vs'@(v:vs)
         | x > 0     = (u - x) : f 0 (u - x + y) us vs'
         | y > v - u = (v - y) : f (v + x - y) 0 us' vs
         | otherwise =       u : f 0 (u + y) us vs'
    -- Reinhard Zumkeller, Oct 09 2013

A097275 Least integer "mod 2 prime signatures" k ordered by number of primitive Pythagorean triples with leg = k.

Original entry on oeis.org

1, 2, 3, 6, 4, 12, 18, 8, 15, 60, 30, 9, 24, 105, 420, 54, 16, 36, 120, 840, 4620, 90, 27, 45, 180, 1155, 9240, 60060, 162, 32, 48, 240, 1260, 13860, 120120, 1021020, 210, 64, 72, 315, 1680, 15015, 180180, 2042040, 19399380, 270, 81, 96, 360, 2520, 18480, 240240
Offset: 0

Views

Author

Ray Chandler, Aug 22 2004

Keywords

Comments

Row 0 of table represents "mod 2 prime signature" values k such that no PPTs have leg=k.
Row n of table, n>0, represents "mod 2 prime signature" values k such that 2^(n-1) PPTs have leg=k. Table read by antidiagonals.
For n=2^a_0*p_1^a_1*...*p_n^a_n where p_i is odd prime and a_1>=a_2>=...>=a_n, define "mod 2 prime signature" to be ordered prime exponents (a_0,a_1,...,a_n).
Least integer with a given "mod 2 prime signature" is obtained by replacing p_1 with 3, p_2 with 5,..., p_n with n-th odd prime.

Examples

			Table begins:
0: 1,2,6,18,30,54,90,162,210,270,...
1: 3,4,8,9,16,27,32,64,81,128,...
2: 12,15,24,36,45,48,72,96,108,135,...
4: 60,105,120,180,240,315,360,480,540,720,...
8: 420,840,1155,1260,1680,2520,3360,3465,3780,5040,...
16: 4620,9240,13860,15015,18480,27720,36960,41580,45045,55440,...
32: 60060,120120,180180,240240,255255,360360,480480,540540,...
64: 1021020,2042040,3063060,4084080,4849845,6126120,8168160,...
128: 19399380,38798760,58198140,77597520,111546435,116396280,...
256: 446185740,892371480,1338557220,1784742960,2677114440,...
		

Crossrefs

Row 1 is A006899 except for starting point.

A227928 Powers of 2 or of 3 in order as occurring in the two ways of parenthesizing the terms in A006895.

Original entry on oeis.org

1, 2, 3, 4, 9, 8, 16, 27, 32, 81, 64, 128, 243, 256, 512, 729, 1024, 2187, 2048, 4096, 6561, 8192, 19683, 16384, 32768, 59049, 65536, 131072, 177147, 262144, 531441, 524288, 1048576, 1594323, 2097152, 4782969, 4194304, 8388608, 14348907, 16777216, 43046721
Offset: 1

Views

Author

Reinhard Zumkeller, Oct 09 2013

Keywords

Comments

Permutation of A006899, a(n) = A006899(n+k) for some k in {-1,0,1}.

Examples

			.  n  |  a(n)                       let x denote A006895
. ----+------
.   1 |    1                     =  x(0)
.   2 |    2                     =  x(1)
.   3 |    3  =   2 +   1        =  x(1) + x(2)
.   4 |    4  =   1 +   3        =  x(2) + x(3)
.   5 |    9  =   3 +   6        =  x(3) + x(4)
.   6 |    8  =   6 +   2        =  x(4) + x(5)
.   7 |   16                     =  x(6)
.   8 |   27  =   2 +  16 +   9  =  x(5) + x(6) + x(7)
.   9 |   32  =   9 +  23        =  x(7) + x(8)
.  10 |   81  =  23 +  58        =  x(8) + x(9)
.  11 |   64  =  58 +   6        =  x(9) + x(10)
.  12 |  128                     =  x(11)
.  13 |  243  =   6 + 128 + 109  =  x(10) + x(11) + x(12)
.  14 |  256  = 109 + 147        =  x(12) + x(13)
.  15 |  512                     =  x(14)
.  16 |  729  = 147 + 512 +  70  =  x(13) + x(14) + x(15) .
		

Programs

  • Haskell
    a227928 n = a227928_list !! (n-1)
    a227928_list = 1 : f 0 0 (tail a000079_list) (tail a000244_list) where
       f x y us'@(u:us) vs'@(v:vs)
         | x > 0     = u : f 0 (u - x + y) us vs'
         | y > v - u = v : f (v + x - y) 0 us' vs
         | otherwise = u : f 0 (u + y) us vs'

A206807 Position of 3^n when {2^j} and {3^k} are jointly ranked; complement of A206805.

Original entry on oeis.org

2, 5, 7, 10, 12, 15, 18, 20, 23, 25, 28, 31, 33, 36, 38, 41, 43, 46, 49, 51, 54, 56, 59, 62, 64, 67, 69, 72, 74, 77, 80, 82, 85, 87, 90, 93, 95, 98, 100, 103, 105, 108, 111, 113, 116, 118, 121, 124, 126, 129, 131, 134, 137, 139, 142, 144, 147, 149, 152, 155
Offset: 1

Views

Author

Clark Kimberling, Feb 16 2012

Keywords

Comments

The joint ranking is for j >= 1 and k >= 1, so that the sets {2^j} and {3^k} are disjoint.

Examples

			The joint ranking begins with 2,3,4,8,9,16,27,32,64,81,128,243,256, so that
A206805 = (1,3,4,6,8,9,11,13,...)
A206807 = (2,5,7,10,12,...)
		

Crossrefs

Programs

  • Mathematica
    f[n_] := 2^n; g[n_] := 3^n; z = 200;
    c = Table[f[n], {n, 1, z}]; s = Table[g[n], {n, 1, z}];
    j = Sort[Union[c, s]];
    p[n_] := Position[j, f[n]]; q[n_] := Position[j, g[n]];
    Flatten[Table[p[n], {n, 1, z}]]           (* A206805 *)
    Table[n + Floor[n*Log[3, 2]], {n, 1, 50}] (* A206805 *)
    Flatten[Table[q[n], {n, 1, z}]]           (* this sequence *)
    Table[n + Floor[n*Log[2, 3]], {n, 1, 50}] (* this sequence as a table *)
  • PARI
    a(n) = logint(3^n, 2) + n; \\ Ruud H.G. van Tol, Dec 10 2023

Formula

a(n) = n + floor(n*log_2(3)).
A206805(n) = n + floor(n*log_3(2)).
a(n) = n + A056576(n). - Michel Marcus, Dec 12 2023
a(n) = A098294(n) + 2*n - 1. - Ruud H.G. van Tol, Jan 22 2024

A372823 Sequence formed as follows: for each k >= 0, insert between 3^k and 3^(k+1) the least power of 2 that is in the interval [3^k, 3^(k+1)], and then arrange the resulting numbers in nondecreasing order.

Original entry on oeis.org

1, 1, 3, 4, 9, 16, 27, 32, 81, 128, 243, 256, 729, 1024, 2187, 4096, 6561, 8192, 19683, 32768, 59049, 65536, 177147, 262144, 531441, 1048576, 1594323, 2097152, 4782969, 8388608, 14348907, 16777216, 43046721, 67108864, 129140163, 134217728, 387420489
Offset: 0

Views

Author

Clark Kimberling, May 18 2024

Keywords

Examples

			3^0 <= 2^0 < 3^1 < 2^2 < 3^2 < 2^4 < 3^3 < ...
		

Crossrefs

Programs

  • Maple
    [seq(op([3^i, 2^ceil(log[2](3^i))]),i=0..50)]; # Robert Israel, May 22 2024
  • Mathematica
    a[n_] := If[EvenQ[n], 3^(n/2), 2^Ceiling[((n - 1)/2) Log[3]/Log[2]]]
    Table[a[n], {n, 0, 37}]

A372824 Sequence formed as follows: for each k >= 0, insert between 3^k and 3^(k+1) the greatest power of 2 that is in the interval [3^k, 3^(k+1)], and then arrange the resulting numbers in nondecreasing order.

Original entry on oeis.org

1, 2, 3, 8, 9, 16, 27, 64, 81, 128, 243, 512, 729, 2048, 2187, 4096, 6561, 16384, 19683, 32768, 59049, 131072, 177147, 524288, 531441, 1048576, 1594323, 4194304, 4782969, 8388608, 14348907, 33554432, 43046721, 67108864, 129140163, 268435456, 387420489
Offset: 0

Views

Author

Clark Kimberling, May 18 2024

Keywords

Examples

			3^0 <= 2^1 < 3^1 < 2^3 < 3^2 < 2^4 < 3^3 < ...
		

Crossrefs

Interspersion of A000244 and A098232.

Programs

  • Mathematica
    a[n_] := If[EvenQ[n], 3^(n/2), 2^Floor[((n + 1)/2) Log[3]/Log[2]]]
    Table[a[n], {n, 0, 37}]
  • PARI
    a(n) = if (n%2, 3^(n\2), 2^logint(3^(n/2), 2)); \\ Michel Marcus, May 23 2024

A096067 Number of 3-smooth numbers between successive numbers that are powers of 2 or of 3.

Original entry on oeis.org

0, 0, 0, 1, 0, 1, 2, 0, 3, 1, 2, 4, 0, 5, 2, 3, 6, 0, 6, 5, 2, 8, 2, 6, 8, 1, 10, 4, 6, 11, 0, 11, 8, 4, 13, 3, 10, 12, 2, 15, 6, 9, 16, 0, 17, 9, 8, 18, 2, 16, 14, 5, 20, 6, 14, 19, 2, 22, 10, 12, 23, 1, 22, 16, 8, 25, 6, 19, 22, 4, 27, 11, 16, 28, 0, 29, 16, 13, 30, 4
Offset: 1

Views

Author

Reinhard Zumkeller, Jul 21 2004

Keywords

Comments

a(n) = {k: A006899(n) < A003586(k) < A006899(n+1)}.

Examples

			n=16: there are three 3-smooth numbers between A006899(16)=3^6=729 and A006899(17)=2^10=1024: A003586(38)=2^8*3=768, A003586(39)=2^5*3^3=864 and A003586(40)=2^2*3^5=972, therefore a(16)=3.
		

Crossrefs

Programs

  • Mathematica
    spi[n_] := Sum[Floor@Log[2, n/3^k] + 1, {k, 0, Floor@Log[3, n]}];
    seq[n_] := Module[{a = Table[0, {n}], p = 1, s = 1}, For[i = 1, i <= Length[a], i++, p = Min[2^(1 + Floor@Log[2, p]), 3^(1 + Floor@Log[3, p])]; With[{t = spi[p]}, a[[i]] = t - s - 1; s = t]]; a];
    seq[100] (* Jean-François Alcover, Dec 17 2021, after Andrew Howroyd's PARI code *)
  • PARI
    \\ here spi(n) is A071521(n).
    spi(n)={sum(k=0, logint(n, 3), logint(n\3^k, 2)+1)}
    seq(n)={my(a=vector(n), p=1, s=1); for(i=1, #a, p=min(2^(1+logint(p,2)), 3^(1+logint(p,3))); my(t=spi(p)); a[i]=t-s-1; s=t); a} \\ Andrew Howroyd, Jan 07 2020

Extensions

Terms a(40) and beyond from Andrew Howroyd, Jan 06 2020

A096075 Least common multiple of first n 3-smooth numbers.

Original entry on oeis.org

1, 2, 6, 12, 12, 24, 72, 72, 144, 144, 144, 432, 864, 864, 864, 864, 1728, 1728, 5184, 5184, 5184, 10368, 10368, 10368, 10368, 10368, 31104, 62208, 62208, 62208, 62208, 62208, 62208, 124416, 124416, 124416, 373248, 373248, 373248, 373248, 746496
Offset: 1

Views

Author

Reinhard Zumkeller, Jul 21 2004

Keywords

Comments

Subsequence of A003586.

Examples

			The first seven 3-smooth numbers are {1, 2, 3, 4, 6, 8, 9} and their lcm is 72. - _David A. Corneth_, Jul 13 2023
		

Crossrefs

Programs

  • Mathematica
    seq[max_] := Module[{sm3 = Sort[Flatten[Table[2^i*3^j, {i, 0, Log2[max]}, {j, 0, Log[3, max/2^i]}]]], e2, e3}, e2 = FoldList[Max, IntegerExponent[sm3, 2]]; e3 = FoldList[Max, IntegerExponent[sm3, 3]]; 2^e2*3^e3]; seq[1000] (* Amiram Eldar, Jul 13 2023 *)

Formula

a(n) > a(n-1) iff A003586(n) is a power of 2 or of 3 (cf. A006899, A022330, A022331).

A258439 Powers of 3 alternating with powers of 2.

Original entry on oeis.org

1, 1, 3, 2, 9, 4, 27, 8, 81, 16, 243, 32, 729, 64, 2187, 128, 6561, 256, 19683, 512, 59049, 1024, 177147, 2048, 531441, 4096, 1594323, 8192, 4782969, 16384, 14348907, 32768, 43046721, 65536, 129140163, 131072, 387420489, 262144, 1162261467
Offset: 0

Views

Author

Luce ETIENNE, May 30 2015

Keywords

Comments

a(n)*A098293(n) = A000400(floor(n/2)).

Crossrefs

Programs

  • GAP
    Flat(List([0..20],n->[3^n,2^n])); # Muniru A Asiru, Jul 16 2018
    
  • Magma
    &cat[[3^n, 2^n]: n in [0..35]]; // Vincenzo Librandi, Jul 17 2018
  • Maple
    seq(op([3^n,2^n]),n=0..20); # Muniru A Asiru, Jul 16 2018
  • Mathematica
    Flatten[Table[{3^n, 2^n}, {n, 0, 25}]] (* Vincenzo Librandi, Jul 17 2018 *)
  • PARI
    Vec(-(3*x^3+2*x^2-x-1)/((2*x^2-1)*(3*x^2-1)) + O(x^100)) \\ Colin Barker, May 30 2015
    

Formula

a(n) = ((5+(-1)^n)/2)^((2*n-1+(-1)^n)/4).
a(n) = 5*a(n-2)-6*a(n-4). - Colin Barker, May 30 2015
G.f.: -(3*x^3+2*x^2-x-1) / ((2*x^2-1)*(3*x^2-1)). - Colin Barker, May 30 2015

A328415 Numbers k such that (Z/mZ)* = C_2 X C_(2k) has exactly one solution, where (Z/mZ)* is the multiplicative group of integers modulo m.

Original entry on oeis.org

4, 16, 27, 32, 64, 256, 512, 1024, 2048, 2187, 4096, 6561, 8192, 16384, 59049, 65536, 131072, 177147, 262144, 524288, 531441, 1048576, 1594323, 2097152, 4194304, 4782969, 8388608, 14348907, 16777216, 33554432, 67108864, 134217728, 268435456, 387420489, 536870912, 1073741824
Offset: 1

Views

Author

Jianing Song, Oct 14 2019

Keywords

Comments

Numbers k being powers of 2 or 3 such that 2*k+1 is not prime.
Proof. If m is a solution to (Z/mZ)* = C_2 X C_(2k) such that m is odd, then 2*m is also a solution, and vice versa. So if there is only one solution to (Z/mZ)* = C_2 X C_(2k), m must be a multiple of 4. If 8 divides m and m has odd prime factors, or if m has at least two distinct odd prime factors, then A046072(m) >= 3, a contradiction. So m = 2^e, e >= 3 or m = 4*p^e, p odd prime and e >= 1. If m = 4*p^e and p >= 5, then (Z/(3*p^e)Z)* = (Z/mZ)*. So we have m = 2^e, e >= 3 or m = 4*3^e, e >= 1, then (Z/mZ)* = C_2 X C_(2*2^(e-3)) or (Z/mZ)* = C_2 X C_(2*3^(e-1)).
If k = 2^(e-3) > 1 and p = 2*k+1 is prime, then (Z/(3*p)Z)* = (Z/(2^e)Z)*; if k = 3^(e-1) > 1 and p = 2*k+1 is prime, then (Z/(3*p)Z)* = (Z/(4*3^e)Z)*; on the other hand, if k is a power of 2 or a power of 3 such that 2*k+1 is not prime, then (Z/mZ)* = C_2 X C_(2k) indeed has only one solution.

Examples

			The only solution to (Z/mZ)* = C_2 X C_54 is m = 324, so 54/2 = 27 is a term.
		

Crossrefs

Cf. A328412.

Programs

  • PARI
    select(i->!isprime(2*i+1), upto(10^9)) \\ See A006899 for the function upto(n)
Previous Showing 21-30 of 34 results. Next