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-6 of 6 results.

A000037 Numbers that are not squares (or, the nonsquares).

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Note the remarkable formula for the n-th term (see the FORMULA section)!
These are the natural numbers with an even number of divisors. The number of divisors is odd for the complementary sequence, the squares (sequence A000290) and the numbers for which the number of divisors is divisible by 3 is sequence A059269. - Ola Veshta (olaveshta(AT)my-deja.com), Apr 04 2001
a(n) is the largest integer m not equal to n such that n = (floor(n^2/m) + m)/2. - Alexander R. Povolotsky, Feb 10 2008
Union of A007969 and A007970; A007968(a(n)) > 0. - Reinhard Zumkeller, Jun 18 2011
Terms of even numbered rows in the triangle A199332. - Reinhard Zumkeller, Nov 23 2011
If a(n) and a(n+1) are of the same parity then (a(n)+a(n+1))/2 is a square. - Zak Seidov, Aug 13 2012
Theaetetus of Athens proved the irrationality of the square roots of these numbers in the 4th century BC. - Charles R Greathouse IV, Apr 18 2013
4*a(n) are the even members of A079896, the discriminants of indefinite binary quadratic forms. - Wolfdieter Lang, Jun 14 2013

Examples

			For example note that the squares 0, 1, 4, 9, 16 are not included.
		

References

  • Titu Andreescu, Dorin Andrica, and Zuming Feng, 104 Number Theory Problems, Birkhäuser, 2006, 58-60.
  • 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

Cf. A242401 (subsequence).
Cf. A086849 (partial sums), A048395.

Programs

  • Haskell
    a000037 n = n + a000196 (n + a000196 n)
    -- Reinhard Zumkeller, Nov 23 2011
    
  • Magma
    [n : n in [1..1000] | not IsSquare(n) ];
    
  • Magma
    at:=0; for n in [1..10000] do if not IsSquare(n) then at:=at+1; print at, n; end if; end for;
    
  • Maple
    A000037 := n->n+floor(1/2+sqrt(n));
  • Mathematica
    a[n_] := (n + Floor[Sqrt[n + Floor[Sqrt[n]]]]); Table[a[n], {n, 71}] (* Robert G. Wilson v, Sep 24 2004 *)
    With[{upto=100},Complement[Range[upto],Range[Floor[Sqrt[upto]]]^2]] (* Harvey P. Dale, Dec 02 2011 *)
    a[ n_] :=  If[ n < 0, 0, n + Round @ Sqrt @ n]; (* Michael Somos, May 28 2014 *)
  • Maxima
    A000037(n):=n + floor(1/2 + sqrt(n))$ makelist(A000037(n),n,1,50); /* Martin Ettl, Nov 15 2012 */
    
  • PARI
    {a(n) = if( n<0, 0, n + (1 + sqrtint(4*n)) \ 2)};
    
  • Python
    from math import isqrt
    def A000037(n): return n+isqrt(n+isqrt(n)) # Chai Wah Wu, Mar 31 2022
    
  • Python
    from math import isqrt
    def A000037(n): return n+(k:=isqrt(n))+int(n>=k*(k+1)+1) # Chai Wah Wu, Jun 17 2024

Formula

a(n) = n + floor(1/2 + sqrt(n)).
a(n) = n + floor(sqrt( n + floor(sqrt n))).
A010052(a(n)) = 0. - Reinhard Zumkeller, Jan 26 2010
A173517(a(n)) = n; a(n)^2 = A030140(n). - Reinhard Zumkeller, Feb 20 2010
a(n) = A000194(n) + n. - Jaroslav Krizek, Jun 14 2009
a(A002061(n)) = a(n^2-n+1) = A002522(n) = n^2 + 1. - Jaroslav Krizek, Jun 21 2009

Extensions

Edited by Charles R Greathouse IV, Oct 30 2009

A252849 Numbers with an even number of square divisors.

Original entry on oeis.org

4, 8, 9, 12, 18, 20, 24, 25, 27, 28, 36, 40, 44, 45, 49, 50, 52, 54, 56, 60, 63, 64, 68, 72, 75, 76, 84, 88, 90, 92, 98, 99, 100, 104, 108, 116, 117, 120, 121, 124, 125, 126, 128, 132, 135, 136, 140, 144, 147, 148
Offset: 1

Views

Author

Walker Dewey Anderson, Mar 22 2015

Keywords

Comments

Closed lockers in the locker problem where the student numbers are the set of perfect squares.
The locker problem is a classic mathematical problem. Imagine a row containing an infinite number of lockers numbered from one to infinity. Also imagine an infinite number of students numbered from one to infinity. All of the lockers begin closed. The first student opens every locker that is a multiple of one, which is every locker. The second student closes every locker that is a multiple of two, so all of the even-numbered lockers are closed. The third student opens or closes every locker that is a multiple of three. This process continues for all of the students.
A variant on the locker problem is when not all student numbers are considered; in the case of this sequence, only the square-numbered students open and close lockers. The sequence here is a list of the closed lockers after all of the students have gone.
From Amiram Eldar, Jul 07 2020: (Start)
Numbers k such that the largest square dividing k (A008833) is not a fourth power.
The asymptotic density of this sequence is 1 - Pi^2/15 = 1 - A182448 = 0.342026... (Cesàro, 1885). (End)
Closed under application of A331590: for n, k >= 1, A331590(a(n), k) is in the sequence. - Peter Munn, Sep 18 2020

Crossrefs

Complement of A252895.
A046951, A335324 are used in a formula defining this sequence.
Disjoint union of A336593 and A336594.
A030140, A038109, A082293, A217319 are subsequences.
Ordered 3rd trisection of A225546.

Programs

Formula

From Peter Munn, Sep 18 2020: (Start)
Numbers k such that A046951(k) mod 2 = 0.
Numbers k such that A335324(k) > 1.
(End)

A352780 Square array A(n,k), n >= 1, k >= 0, read by descending antidiagonals, such that the row product is n and column k contains only (2^k)-th powers of squarefree numbers.

Original entry on oeis.org

1, 1, 2, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 4, 5, 1, 1, 1, 1, 1, 6, 1, 1, 1, 1, 1, 1, 7, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 9, 10, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 11, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 13, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 14
Offset: 1

Views

Author

Antti Karttunen and Peter Munn, Apr 02 2022

Keywords

Comments

This is well-defined because positive integers have a unique factorization into powers of nonunit squarefree numbers with distinct exponents that are powers of 2.
Each (infinite) row is the lexicographically earliest with product n and terms that are a (2^k)-th power for all k.
For all k, column k is column k+1 of A060176 conjugated by A225546.

Examples

			The top left corner of the array:
  n/k |   0   1   2   3   4   5   6
------+------------------------------
    1 |   1,  1,  1,  1,  1,  1,  1,
    2 |   2,  1,  1,  1,  1,  1,  1,
    3 |   3,  1,  1,  1,  1,  1,  1,
    4 |   1,  4,  1,  1,  1,  1,  1,
    5 |   5,  1,  1,  1,  1,  1,  1,
    6 |   6,  1,  1,  1,  1,  1,  1,
    7 |   7,  1,  1,  1,  1,  1,  1,
    8 |   2,  4,  1,  1,  1,  1,  1,
    9 |   1,  9,  1,  1,  1,  1,  1,
   10 |  10,  1,  1,  1,  1,  1,  1,
   11 |  11,  1,  1,  1,  1,  1,  1,
   12 |   3,  4,  1,  1,  1,  1,  1,
   13 |  13,  1,  1,  1,  1,  1,  1,
   14 |  14,  1,  1,  1,  1,  1,  1,
   15 |  15,  1,  1,  1,  1,  1,  1,
   16 |   1,  1, 16,  1,  1,  1,  1,
   17 |  17,  1,  1,  1,  1,  1,  1,
   18 |   2,  9,  1,  1,  1,  1,  1,
   19 |  19,  1,  1,  1,  1,  1,  1,
   20 |   5,  4,  1,  1,  1,  1,  1,
		

Crossrefs

Sequences used in a formula defining this sequence: A000188, A007913, A060176, A225546.
Cf. A007913 (column 0), A335324 (column 1).
Range of values: {1} U A340682 (whole table), A005117 (column 0), A062503 (column 1), {1} U A113849 (column 2).
Row numbers of rows:
- with a 1 in column 0: A000290\{0};
- with a 1 in column 1: A252895;
- with a 1 in column 0, but not in column 1: A030140;
- where every 1 is followed by another 1: A337533;
- with 1's in all even columns: A366243;
- with 1's in all odd columns: A366242;
- where every term has an even number of distinct prime factors: A268390;
- where every term is a power of a prime: A268375;
- where the terms are pairwise coprime: A138302;
- where the last nonunit term is coprime to the earlier terms: A369938;
- where the last nonunit term is a power of 2: A335738.
Number of nonunit terms in row n is A331591(n); their positions are given (in reversed binary) by A267116(n); the first nonunit is in column A352080(n)-1 and the infinite run of 1's starts in column A299090(n).

Programs

  • PARI
    up_to = 105;
    A352780sq(n, k) = if(k==0, core(n), A352780sq(core(n, 1)[2], k-1)^2);
    A352780list(up_to) = { my(v = vector(up_to), i=0); for(a=1,oo, forstep(col=a-1,0,-1, i++; if(i > up_to, return(v)); v[i] = A352780sq(a-col,col))); (v); };
    v352780 = A352780list(up_to);
    A352780(n) = v352780[n];

Formula

A(n,0) = A007913(n); for k > 0, A(n,k) = A(A000188(n), k-1)^2.
A(n,k) = A225546(A060176(A225546(n), k+1)).
A331591(A(n,k)) <= 1.

A336594 Numbers k such that k/A008835(k) is cubefree but not squarefree (A067259), where A008835(k) is the largest 4th power dividing k.

Original entry on oeis.org

4, 9, 12, 18, 20, 25, 28, 36, 44, 45, 49, 50, 52, 60, 63, 64, 68, 75, 76, 84, 90, 92, 98, 99, 100, 116, 117, 121, 124, 126, 132, 140, 144, 147, 148, 150, 153, 156, 164, 169, 171, 172, 175, 180, 188, 192, 196, 198, 204, 207, 212, 220, 225, 228, 234, 236, 242, 244
Offset: 1

Views

Author

Amiram Eldar, Jul 26 2020

Keywords

Comments

Numbers such that at least one of the exponents in their prime factorization is of the form 4*m + 2, and none are of the form 4*m + 3.
The asymptotic density of this sequence is zeta(4) * (1/zeta(3) - 1/zeta(2)) = Pi^4/(90*zeta(3)) - Pi^2/15 = 0.2424190509... (Cohen, 1963).

Examples

			4 is a term since the largest 4th power dividing 4 is 1, and 4/1 = 4 = 2^2 is cubefree but not squarefree.
64 is a term since the largest 4th power dividing 64 is 16, and 64/16 = 4 = 2^2 is cubefree but not squarefree.
		

Crossrefs

Complement of A336593 within A252849.
A030140 is a subsequence.

Programs

  • Mathematica
    Select[Range[250], Max[Mod[FactorInteger[#][[;; , 2]], 4]] == 2 &]

A352080 a(n) is the number of times that the square root operation must be applied to n in order to reach an irrational number.

Original entry on oeis.org

1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1
Offset: 2

Views

Author

Ryan Jean, Mar 02 2022

Keywords

Comments

a(1) is undefined because 1^(1/2^k) = 1 for all k.
Column a(n)-1 has the first nonunit term in row n of A352780. - Peter Munn, Nov 15 2022

Examples

			a(2) = 1 because sqrt(2) is irrational.
a(16) = 3 because sqrt(16) = 16^(1/2) = 4, sqrt(sqrt(16)) = 16^(1/4) = 2, but sqrt(sqrt(sqrt(16))) = 16^(1/8) = sqrt(2), which is irrational.
		

Crossrefs

Cf. A000290 (squares), A010052.
See the formula section for the relationships with A001511, A007814, A052409, A267116.
Cf. also A000037 (indices of 1's), A030140 (indices of 2's).
Cf. A352780.

Programs

  • Mathematica
    a[n_] := IntegerExponent[GCD @@ FactorInteger[n][[;; , 2]], 2] + 1; Array[a, 100, 2] (* Amiram Eldar, Mar 03 2022 *)
  • PARI
    a(n) = if (!issquare(n, &n), 1, a(n)+1); \\ Michel Marcus, Mar 03 2022

Formula

a(n) is the minimum k such that n^(1/2^k) is irrational.
a(n) = A007814(A052409(n)) + 1. - Amiram Eldar, Mar 03 2022
a(n) = A001511(A267116(n)). - Peter Munn, Nov 15 2022

A374458 Squares of exponentially odd numbers (A268335).

Original entry on oeis.org

1, 4, 9, 25, 36, 49, 64, 100, 121, 169, 196, 225, 289, 361, 441, 484, 529, 576, 676, 729, 841, 900, 961, 1024, 1089, 1156, 1225, 1369, 1444, 1521, 1600, 1681, 1764, 1849, 2116, 2209, 2601, 2809, 2916, 3025, 3136, 3249, 3364, 3481, 3721, 3844, 4225, 4356, 4489
Offset: 1

Views

Author

Amiram Eldar, Jul 09 2024

Keywords

Comments

Numbers whose exponents in their prime factorization are all congruent to 2 (mod 4).

Crossrefs

Programs

  • Mathematica
    Select[Range[100], AllTrue[FactorInteger[#][[;;, 2]], OddQ] &]^2
  • PARI
    is(k) = issquare(k) && if(k == 1, 1, my(e = factor(k)[, 2]); for(i = 1, #e, if(e[i] % 4 != 2, return(0))); 1);

Formula

a(n) = A000290(A268335(n)) = A268335(n)^2.
Sum_{n>=1} 1/a(n) = zeta(4) * Product_{p prime} (1 + 1/p^2 - 1/p^4) = 1.54211628314015874165... .
Sum_{n>=1} 1/a(n)^s = zeta(4*s) * Product_{p prime} (1 + 1/p^(2*s) - 1/p^(4*s)), for s > 1/2.
Showing 1-6 of 6 results.