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

A161827 Complement of A006446.

Original entry on oeis.org

5, 7, 10, 11, 13, 14, 17, 18, 19, 21, 22, 23, 26, 27, 28, 29, 31, 32, 33, 34, 37, 38, 39, 40, 41, 43, 44, 45, 46, 47, 50, 51, 52, 53, 54, 55, 57, 58, 59, 60, 61, 62, 65, 66, 67, 68, 69, 70, 71, 73, 74, 75, 76, 77, 78, 79, 82, 83, 84, 85, 86, 87, 88, 89, 91, 92, 93, 94, 95, 96, 97, 98
Offset: 1

Views

Author

Omar E. Pol, Jun 21 2009, Jun 28 2009, Feb 08 2010

Keywords

Comments

The asymptotic density of this sequence is 1 (Cooper and Kennedy, 1989). - Amiram Eldar, Jul 10 2020

Crossrefs

Extensions

More terms from N. J. A. Sloane, Feb 08 2010

A035106 1, together with numbers of the form k*(k+1) or k*(k+2), k > 0.

Original entry on oeis.org

1, 2, 3, 6, 8, 12, 15, 20, 24, 30, 35, 42, 48, 56, 63, 72, 80, 90, 99, 110, 120, 132, 143, 156, 168, 182, 195, 210, 224, 240, 255, 272, 288, 306, 323, 342, 360, 380, 399, 420, 440, 462, 483, 506, 528, 552, 575, 600, 624, 650, 675, 702, 728, 756, 783, 812, 840
Offset: 1

Views

Author

N. J. A. Sloane, revised Oct 30 2001

Keywords

Comments

Largest integer m such that every permutation (p_1, ..., p_n) of (1, ..., n) satisfies p_i * p_{i+1} >= m for some i, 1 <= i <= n-1. Equivalently, smallest integer m such that there exists a permutation (p_1, ..., p_n) of (1, ..., n) satisfying p_i * p_{i+1} <= m for every i, 1 <= i <= n-1.
Also, nonsquare positive integers m such that floor(sqrt(m)) divides m. - Max Alekseyev, Nov 27 2006
Also, for n>1, a(n) is the number of non-isomorphic simple connected undirected graphs having n+1 edges and a longest path of length n. - Nathaniel Gregg, Nov 02 2021

Examples

			n=5: we must arrange the numbers 1..5 so that the max of the products of pairs of adjacent terms is minimized. The answer is 51324, with max product = 8, so a(5) = 8.
		

Crossrefs

First differences give (essentially) A028242.
Bisections: A002378 (pronic numbers) and A005563.

Programs

  • GAP
    Concatenation([1], List([2..60], n-> (2*n*(n+2) +3*((-1)^n -1))/8)); # G. C. Greubel, Jun 10 2019
  • Haskell
    import Data.List.Ordered (union)
    a035106 n = a035106_list !! (n-1)
    a035106_list = 1 : tail (union a002378_list a005563_list)
    -- Reinhard Zumkeller, Oct 05 2015
    
  • Magma
    [1] cat [(2*n*(n+2) +3*((-1)^n -1))/8: n in [2..60]]; // G. C. Greubel, Jun 10 2019
    
  • Mathematica
    Join[{1},LinearRecurrence[{2,0,-2,1},{2,3,6,8},60]] (* or *) Join[{1}, Table[ If[EvenQ[n],(n(n+2))/4,((n-1)(n+3))/4],{n,2,60}]] (* Harvey P. Dale, May 03 2012 *)
  • PARI
    my(x='x+O('x^60)); Vec(x*(x^4-2*x^3+x^2-1)/((x-1)^3*(x+1))) \\ Altug Alkan, Oct 23 2015
    
  • PARI
    A035106(n)=!(n-1)+floor((n^2)/4+n/2); \\ R. J. Cano, Jul 24 2023
    
  • Sage
    [1]+[(2*n*(n+2) +3*((-1)^n -1))/8 for n in (2..60)] # G. C. Greubel, Jun 10 2019
    

Formula

For n > 1, a(n) = n*(n+2)/4 if n is even and (n-1)*(n+3)/4 if n is odd. - Jud McCranie, Oct 25 2001
a(n) = a(n-1) + a(n-2) - a(n-3) + 1 = A002620(n+2) + A004526(n+2). - Henry Bottomley, Mar 08 2000
a(n+2) = (2*n^2 + 12*n + 3*(-1)^n + 13)/8, with a(1)=1, i.e., a(n+2) = (n+2)*(n+4)/4 if n is even and (n+1)*(n+5)/4 if n is odd. - Vladeta Jovovic, Oct 23 2001
From Cecilia Rossiter (cecilia(AT)noticingnumbers.net), Dec 14 2004: (Start)
a(n) = a(n-2) + (n-1), where a(1) = 0, a(2) = 0.
a(n) = (2*(n+1)^2 + 3*(-1)^n - 5)/8, n>=2, with a(1)=1. (End)
For n > 1, a(n) = floor((n+1)^4/(4*(n+1)^2+1)). - Gary Detlefs, Feb 11 2010
For n > 1, a(n) = n + ceiling((1/4)*(n-1)^2) - 1. - Clark Kimberling, Jan 07 2011; corrected by Arkadiusz Wesolowski, Sep 25 2012
a(1)=1, a(2)=2, a(3)=3, a(4)=6, a(5)=8; for n > 5, a(n) = 2*a(n-1) - 2*a(n-3) + a(n-4). - Harvey P. Dale, May 03 2012
G.f.: x + x^2*(2-x) / ( (1+x)*(1-x)^3 ) = x*(x^4 - 2*x^3 + x^2 - 1)/((x-1)^3*(x+1)). - Vladeta Jovovic, Oct 23 2001; Harvey P. Dale, May 03 2012
a(n) = floor(n/2)*(1 + ceiling(n/2)), a(1) = 1. - Arkadiusz Wesolowski, Sep 25 2012
a(n) = ceiling((n-1)*(n+3)/4), n > 1. - Wesley Ivan Hurt, Jun 14 2013
a(n+1) - a(n) = A052938(n-2) for n > 1. - Reinhard Zumkeller, Oct 06 2015
E.g.f.: (8*x + 3*exp(-x) - (3-6*x-2*x^2)*exp(x))/8. - G. C. Greubel, Jun 10 2019
Sum_{n>=1} 1/a(n) = 11/4. - Amiram Eldar, Sep 24 2022

Extensions

Edited by Max Alekseyev, Oct 09 2015
Definition modified to allow for the initial 1. - N. J. A. Sloane, May 17 2016

A087811 Numbers k such that ceiling(sqrt(k)) divides k.

Original entry on oeis.org

1, 2, 4, 6, 9, 12, 16, 20, 25, 30, 36, 42, 49, 56, 64, 72, 81, 90, 100, 110, 121, 132, 144, 156, 169, 182, 196, 210, 225, 240, 256, 272, 289, 306, 324, 342, 361, 380, 400, 420, 441, 462, 484, 506, 529, 552, 576, 600, 625, 650, 676, 702, 729, 756, 784, 812, 841
Offset: 1

Views

Author

Reinhard Zumkeller, Oct 16 2003

Keywords

Comments

Essentially the same as the quarter-squares A002620.
Nonsquare terms of this sequence are given by A002378. - Max Alekseyev, Nov 27 2006
This also gives the number of ways to make change for "c" cents using only pennies, nickels and dimes. You must first set n=floor(c/5), to account for the 5-repetitive nature of the task. - Adam Sasson, Feb 09 2011
These are the segment boundaries of Oppermann's conjecture (1882): n^2-n < p < n^2 < p < n^2+n. - Fred Daniel Kline, Apr 07 2011
a(n) is the number of triples (w,x,y) having all terms in {0..n} and w=2*x+y. - Clark Kimberling, Jun 04 2012
a(n+1) is also the number of points with integer coordinates inside a rectangle isosceles triangle with hypotenuse [0,n] (see A115065 for an equilateral triangle). - Michel Marcus, Aug 05 2013
a(n) = degree of generating polynomials of Galois numbers in (n+1)-dimensional vector space, defined as total number of subspaces in (n+1) space over GF(n) (see Mathematica procedure), when n is a power of a prime. - Artur Jasinski, Aug 31 2016, corrected by Robert Israel, Sep 23 2016
Also number of pairs (x,y) with 0 < x <= y <= n, x + y > n. - Ralf Steiner, Jan 05 2020

Crossrefs

Programs

  • Haskell
    a087811 n = (n + n `mod` 2) * (n + 2 - n `mod` 2) `div` 4
    -- Reinhard Zumkeller, Oct 27 2012
    
  • Magma
    [ n: n in [1..841] | n mod Ceiling(Sqrt(n)) eq 0 ]; // Bruno Berselli, Feb 09 2011
    
  • Maple
    f:= gfun:-rectoproc({a(n)=n+a(n-2),a(1)=1,a(2)=2},a(n),remember):
    map(f, [$1..100]); # Robert Israel, Aug 31 2016
  • Mathematica
    a[1] := 1; a[2] := 2; a[n_] := n + a[n - 2]; Table[a[n], {n, 57}] (* Alonso del Arte *)
    GaloisNumber[n_, q_] :=
    Sum[QBinomial[n, m, q], {m, 0, n}]; aa = {}; Do[
    sub = Table[GaloisNumber[m, n], {n, 0, 200}];
    pp = InterpolatingPolynomial[sub, x]; pol = pp /. x -> n + 1;
    coef = CoefficientList[pol, n];
    AppendTo[aa, Length[coef] - 1], {m, 2, 25}]; aa (* Artur Jasinski, Aug 31 2016 *)
    Select[Range[900],Divisible[#,Ceiling[Sqrt[#]]]&] (* or *) LinearRecurrence[ {2,0,-2,1},{1,2,4,6},60] (* Harvey P. Dale, Nov 06 2016 *)
  • PARI
    a(n)=(n+n%2)*(n+2-n%2)/4 \\ Charles R Greathouse IV, Apr 03 2012
    
  • PARI
    j=0;for(k=1,850,s=sqrtint(4*k+1);if(s>j,j=s;print1(k,", "))) \\ Hugo Pfoertner, Sep 17 2018
    
  • Python
    def A087811(n): return n*(n+2)+(n&1)>>2 # Chai Wah Wu, Jul 27 2022

Formula

a(n) = (n + n mod 2)*(n + 2 - n mod 2)/4.
Numbers of the form m^2 or m^2 - m. - Don Reble, Oct 17 2003
a(1) = 1, a(2) = 2, a(n) = n + a(n - 2). - Alonso del Arte, Jun 18 2005
From Bruno Berselli, Feb 09 2011: (Start)
G.f.: x/((1+x)*(1-x)^3).
a(n) = (2*n*(n+2)-(-1)^n+1)/8. (End)
G.f.: G(0)/(2*(1-x^2)*(1-x)), where G(k) = 1 + 1/(1 - x*(2*k+1)/(x*(2*k+2) + 1/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, May 25 2013
a(n) = (C(n+2,2) - floor((n+2)/2))/2. - Mircea Merca, Nov 23 2013
a(n) = ((-1)^n*(-1 + (-1)^n*(1 + 2*n*(2 + n))))/8. - Fred Daniel Kline, Jan 06 2015
a(n) = Product_{k=1...n-1} (1 + 2 / (k + k mod 2)), n >= 1. - Fred Daniel Kline, Oct 30 2016
E.g.f.: (1/4)*(x*(3 + x)*cosh(x) + (1 + 3*x + x^2)*sinh(x)). - Stefano Spezia, Jan 05 2020
a(n) = (n*(n+2)+(n mod 2))/4. - Chai Wah Wu, Jul 27 2022
Sum_{n>=1} 1/a(n) = Pi^2/6 + 1. - Amiram Eldar, Sep 17 2022
a(n) = A024206(n) + 1. - Ya-Ping Lu, Dec 29 2023

A194960 a(n) = floor((n+2)/3) + ((n-1) mod 3).

Original entry on oeis.org

1, 2, 3, 2, 3, 4, 3, 4, 5, 4, 5, 6, 5, 6, 7, 6, 7, 8, 7, 8, 9, 8, 9, 10, 9, 10, 11, 10, 11, 12, 11, 12, 13, 12, 13, 14, 13, 14, 15, 14, 15, 16, 15, 16, 17, 16, 17, 18, 17, 18, 19, 18, 19, 20, 19, 20, 21, 20, 21, 22, 21, 22, 23, 22, 23, 24, 23, 24, 25, 24, 25, 26, 25, 26
Offset: 1

Views

Author

Clark Kimberling, Sep 06 2011

Keywords

Comments

The sequence is formed by concatenating triples of the form (n, n+1, n+2) for n>=1. See A194961 and A194962 for the associated fractalization and interspersion. The sequence can be obtained from A008611 by deleting its first four terms.
The sequence contains every positive integer n exactly min(n,3) times. - Wesley Ivan Hurt, Dec 17 2013

Crossrefs

Programs

  • Magma
    I:=[1,2,3,2]; [n le 4 select I[n] else Self(n-1)+Self(n-3)-Self(n-4): n in [1..100]]; // Vincenzo Librandi, Dec 17 2013
    
  • Maple
    A194960:=n->floor((n+2)/3)+((n-1) mod 3); seq(A194960(n), n=1..100); # Wesley Ivan Hurt, Dec 17 2013
  • Mathematica
    (* First program *)
    p[n_]:= Floor[(n+2)/3] + Mod[n-1, 3]
    Table[p[n], {n, 1, 90}]  (* A194960 *)
    g[1] = {1}; g[n_]:= Insert[g[n-1], n, p[n]]
    f[1] = g[1]; f[n_]:= Join[f[n-1], g[n]]
    f[20]  (* A194961 *)
    row[n_]:= Position[f[30], n];
    u = TableForm[Table[row[n], {n, 1, 5}]]
    v[n_, k_]:= Part[row[n], k];
    w = Flatten[Table[v[k, n-k+1], {n, 1, 13}, {k, 1, n}]]  (* A194962 *)
    q[n_]:= Position[w, n];
    Flatten[Table[q[n], {n, 1, 80}]]  (* A194963 *)
    (* Other programs *)
    CoefficientList[Series[(1 +x +x^2 -2 x^3)/((1+x+x^2) (1-x)^2), {x, 0, 100}], x] (* Vincenzo Librandi, Dec 17 2013 *)
    Table[(n+4 -2*ChebyshevU[2*n+4, 1/2])/3, {n,80}] (* G. C. Greubel, Oct 23 2022 *)
  • PARI
    a(n)=(n+2)\3 + (n-1)%3 \\ Charles R Greathouse IV, Sep 02 2015
    
  • SageMath
    [(n+4 - 2*chebyshev_U(2*n+4, 1/2))/3 for n in (1..80)] # G. C. Greubel, Oct 23 2022

Formula

From R. J. Mathar, Sep 07 2011: (Start)
a(n) = ((-1)^n*A130772(n) + n + 4)/3.
G.f.: x*(1 + x + x^2 - 2*x^3)/((1+x+x^2)*(1-x)^2). (End)
a(n) = A006446(n)/floor(sqrt(A006446(n))). - Benoit Cloitre, Jan 15 2012
a(n) = a(n-1) + a(n-3) - a(n-4). - Vincenzo Librandi, Dec 17 2013
a(n) = a(n-3) + 1, n >= 1, with input a(-2) = 0, a(-1) = 1 and a(0) = 2. Proof trivial. a(n) = A008611(n+3), n >= -2. See the first comment above. - Wolfdieter Lang, May 06 2017
From Guenther Schrack, Nov 09 2020: (Start)
a(n) = n - 2*floor((n-1)/3).
a(n) = (n + 2 + 2*((n-1) mod 3))/3.
a(n) = (3*n + 12 + 2*(w^(2*n)*(1 - w) + w^n*(2 + w)))/9, where w = (-1 + sqrt(-3))/2.
a(n) = (n + 4 + 2*A049347(n))/3.
a(n) = (2*n + 3 - A330396(n-1))/3. (End)
a(n) = (n + 4 - 2*A010892(2*n+4))/3. - G. C. Greubel, Oct 23 2022

A336064 Numbers divisible by the maximal exponent in their prime factorization (A051903).

Original entry on oeis.org

2, 3, 4, 5, 6, 7, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 26, 27, 28, 29, 30, 31, 33, 34, 35, 36, 37, 38, 39, 41, 42, 43, 44, 46, 47, 48, 50, 51, 52, 53, 54, 55, 57, 58, 59, 60, 61, 62, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 76, 77, 78, 79
Offset: 1

Views

Author

Amiram Eldar, Jul 07 2020

Keywords

Comments

The asymptotic density of this sequence is A336065 = 0.848957... (Schinzel and Šalát, 1994).

Examples

			4 = 2^2 is a term since A051903(4) = 2 is a divisor of 4.
		

References

  • József Sándor and Borislav Crstici, Handbook of Number theory II, Kluwer Academic Publishers, 2004, chapter 3, p. 331.

Crossrefs

A005117 (except for 1) is subsequence.

Programs

  • Mathematica
    H[1] = 0; H[n_] := Max[FactorInteger[n][[;; , 2]]]; Select[Range[2, 100], Divisible[#, H[#]] &]
  • PARI
    isok(m) = if (m>1, (m % vecmax(factor(m)[,2])) == 0); \\ Michel Marcus, Jul 08 2020

A079645 Numbers j such that the integer part of the cube root of j divides j.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 27, 30, 33, 36, 39, 42, 45, 48, 51, 54, 57, 60, 63, 64, 68, 72, 76, 80, 84, 88, 92, 96, 100, 104, 108, 112, 116, 120, 124, 125, 130, 135, 140, 145, 150, 155, 160, 165, 170, 175, 180, 185, 190, 195, 200, 205, 210
Offset: 1

Views

Author

Benoit Cloitre, Jan 31 2003

Keywords

Comments

Concrete Mathematics Casino Problem - Winners.

Examples

			252^(1/3) = 6.316359597656... and 252/6 = 42 hence 252 is in the sequence.
		

References

  • R. L. Graham, D. E. Knuth and O. Patashnik, Concrete Mathematics. 2nd Edition. Addison-Wesley, Reading, MA, 1994. Section 3.2, pp. 74-76.

Crossrefs

Programs

  • Magma
    [n: n in [1..250] | n mod Floor(n^(1/3)) eq 0 ]; // G. C. Greubel, Jul 20 2023
    
  • Maple
    t1:=[]; for n from 1 to 500 do t2:=floor(n^(1/3)); if n mod t2 = 0 then t1:=[op(t1),n]; fi; od: t1; # N. J. A. Sloane, Oct 29 2006
  • Mathematica
    Select[Range[1000], Mod[#, Floor[Power[#, 1/3]]] == 0 &]
    Select[Range[1000],Divisible[#,Floor[CubeRoot[#]]]&] (* Harvey P. Dale, Jun 19 2023 *)
  • SageMath
    [n for n in (1..250) if n%(floor(n^(1/3)))==0 ] # G. C. Greubel, Jul 20 2023

Formula

For n = (k/2)*(3*k+11) - m for some fixed m >= 0 with n > ((k-1)/2)*(3*(k-1) + 11) we have a(n) = k^3 + 3*k^2 + (3-m)*k. - Benoit Cloitre, Jan 22 2012

A162348 List of pairs (i,j) of central factors of n, such that i*j = n, where i is the largest divisor of n <= sqrt(n) and j is the smallest divisor of n >= sqrt(n).

Original entry on oeis.org

1, 1, 1, 2, 1, 3, 2, 2, 1, 5, 2, 3, 1, 7, 2, 4, 3, 3, 2, 5, 1, 11, 3, 4, 1, 13, 2, 7, 3, 5, 4, 4, 1, 17, 3, 6, 1, 19, 4, 5, 3, 7, 2, 11, 1, 23, 4, 6, 5, 5, 2, 13, 3, 9, 4, 7, 1, 29, 5, 6, 1, 31, 4, 8, 3, 11, 2, 17, 5, 7, 6, 6, 1, 37, 2, 19, 3, 13, 5, 8, 1, 41, 6, 7, 1, 43, 4, 11, 5, 9, 2, 23, 1, 47, 6, 8, 7
Offset: 1

Views

Author

Omar E. Pol, Jul 04 2009

Keywords

Comments

Note that if n is a square then the square root of n appears repeated: i = j = sqrt(n).
Squarest (least oblong) integral rectangle with area n. This has minimal semiperimeter (A063655), since s = i + j = i + n/i is minimal when ds/di = 1 - n/i^2 = 0, i.e., n = i^2. - Daniel Forgues, Sep 29 2014

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{d = Divisors@n}, len = Length[d]/2; {d[[Ceiling@len]], d[[Floor[len + 1]] ]}]; f[1] = {1, 1}; Array[f, 49] // Flatten (* Robert G. Wilson v, Aug 17 2009 *)

Extensions

a(35) and further terms from Robert G. Wilson v, Aug 17 2009; corrected Aug 18 2009

A261205 Numbers k such that floor(k^(1/m)) divides k for all integers m >= 1.

Original entry on oeis.org

1, 2, 3, 4, 6, 8, 12, 16, 20, 24, 30, 36, 42, 48, 64, 72, 80, 120, 210, 240, 288, 324, 420, 528, 552, 576, 600, 624, 900, 1260, 1764, 1848, 1980, 3024, 6480, 8100, 8280, 11880, 14160, 14280, 14400, 14520, 14640, 28560, 43680, 44520, 46872, 50400, 175560, 331200, 346920, 491400, 809100, 3418800, 4772040, 38937600, 203918400, 2000862360
Offset: 1

Views

Author

Yan A. Denenberg and Max Alekseyev, Aug 11 2015

Keywords

Comments

Is this a finite sequence?
There are no other terms below 10^23. - Giovanni Resta, Aug 13 2015

Examples

			From _Michel Marcus_, Aug 13 2015: (Start)
For k=1 to 9, we have the following floored roots:
  k=1: 1, 1, ...
  k=2: 2, 1, 1, ...
  k=3: 3, 1, 1, ...
  k=4: 4, 2, 1, 1, ...
  k=5: 5, 2, 1, 1, ...
  k=6: 6, 2, 1, 1, ...
  k=7: 7, 2, 1, 1, ...
  k=8: 8, 2, 2, 1, 1, ...
  k=9: 9, 3, 2, 1, 1, ...
where one can see that 5, 7 and 9 are not terms. (End)
		

Crossrefs

Subsequence of A006446.

Programs

  • Mathematica
    fQ[n_] := Block[{d, k = 2, lst = {}}, While[d = Floor[n^(1/k)]; d > 1, AppendTo[lst, d]; k++]; Union[ IntegerQ@# & /@ (n/Union[lst])] == {True}]; k = 4; lst = {1, 2, 3}; While[k < 10^6, If[fQ@ k, AppendTo[lst, k]; Print@ k]; k++]; lst (* Robert G. Wilson v, Aug 15 2015 *)
  • PARI
    is(n) = my(k,t); k=2; while( (t=sqrtnint(n, k)) > 1, if(n%t, return(0)); k++); 1
    n=1; while(n<10^5,if(is(n),print1(n,", "));n++) /* Able to generate terms < 10^5 */ \\ Derek Orr, Aug 12 2015

A261342 Numbers n such that either floor(n^(1/k)) or ceiling(n^(1/k)) divides n for all integers k >= 1.

Original entry on oeis.org

1, 2, 3, 4, 6, 8, 9, 12, 15, 16, 20, 24, 30, 36, 42, 48, 56, 63, 64, 72, 80, 90, 100, 120, 132, 144, 156, 168, 195, 210, 224, 240, 288, 324, 360, 400, 420, 440, 528, 552, 576, 600, 624, 675, 702, 756, 840, 870, 900, 930, 960, 1056, 1155, 1260, 1332, 1368, 1560, 1680, 1764, 1848, 1980, 2352, 2600, 2704
Offset: 1

Views

Author

Max Alekseyev, Aug 15 2015

Keywords

Comments

Largest known term is a(278) = 8947091986560.
If it exists, a(279) > 10^16.
Is this sequence finite?

Crossrefs

Contains A261205, A261206, A261341 as subsequences.
Subsequence of A006446.

Programs

  • PARI
    { isA261342(n) = my(k,t1,t2); k=2; until(t2<=2, t1=floor(sqrtn(n+.5,k)); t2=ceil(sqrtn(n-.5,k)); if(n%t1 && n%t2, return(0)); k++); 1; }

A336066 Numbers k such that the exponent of the highest power of 2 dividing k (A007814) is a divisor of k.

Original entry on oeis.org

2, 4, 6, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 34, 36, 38, 42, 44, 46, 48, 50, 52, 54, 58, 60, 62, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 90, 92, 94, 98, 100, 102, 106, 108, 110, 112, 114, 116, 118, 120, 122, 124, 126, 130, 132, 134, 138, 140, 142, 144
Offset: 1

Views

Author

Amiram Eldar, Jul 07 2020

Keywords

Comments

All the terms are even by definition.
If m is a term then m*(2*k+1) is a term for all k>=1.
Šalát (1994) proved that the asymptotic density of this sequence is 0.435611... (A336067).

Examples

			2 is a term since A007814(2) = 1 is a divisor of 2.
		

Crossrefs

A001146 and A039956 are subsequences.

Programs

  • Mathematica
    Select[Range[2, 150, 2], Divisible[#, IntegerExponent[#, 2]] &]
  • PARI
    isok(m) = if (!(m%2), (m % valuation(m,2)) == 0); \\ Michel Marcus, Jul 08 2020
    
  • Python
    from itertools import count, islice
    def A336066_gen(startvalue=2): # generator of terms >= startvalue
        return filter(lambda n:n%(~n&n-1).bit_length()==0,count(max(startvalue+startvalue&1,2),2))
    A336066_list = list(islice(A336066_gen(startvalue=3),30)) # Chai Wah Wu, Jul 10 2022
Showing 1-10 of 25 results. Next