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 11-20 of 30 results. Next

A328218 Numbers k for which A006255(k) > A328045(k).

Original entry on oeis.org

2, 3, 6, 20, 24, 28, 30, 32, 35, 40, 42, 45, 56, 84, 90, 91, 99, 108, 110, 120, 126, 143, 150, 156, 165, 171, 180, 182, 189, 195, 198, 210, 220, 224, 231, 243, 245, 272, 280, 285, 294, 304, 312, 315, 323, 330, 342, 350, 378, 405, 416, 420, 432, 455, 459, 460
Offset: 1

Views

Author

Peter Kagey, Oct 08 2019

Keywords

Comments

This is a subsequence of A269045.

Crossrefs

A291634 Number of primitive sequences n = b_1 < b_2 < ... < b_t = A006255(n) such that b_1*b_2*...*b_t is a perfect square.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 3, 1, 1, 1, 8, 1, 11, 1, 1, 2, 20, 1, 1, 2, 1, 1
Offset: 1

Views

Author

Peter Kagey, Aug 29 2017

Keywords

Comments

A primitive sequence is one such that no proper, nonempty subsequence has a product that is a perfect square.
Trivially, a(n) <= A259527(n). If A259527(n) = 1, then a(n) = 1.

Examples

			For n = 22 the a(22) = 2 solutions are:
22 * 24 * 33 = 132^2, and
22 * 27 * 32 * 33 = 792^2.
Note that 22 * 24 * 25 * 33 = 660^2 is not a solution because the subsequence [25] has a square product.
		

Crossrefs

A302490 Fewest number of distinct prime factors in any product of a_1*a_2*...*a_t where n = a_1 < a_2 < ... < a_t = A006255(n) and the product is square.

Original entry on oeis.org

0, 2, 2, 1, 2, 2, 2, 3, 1, 3, 3, 3, 3, 4, 3, 1, 2, 2, 2, 3, 3, 3, 2, 2, 1, 3, 4, 3, 2, 4, 2, 3, 5, 4, 4, 2, 3, 3, 3, 3, 3, 3, 3, 4, 3, 3, 3, 3, 1, 4, 4, 5, 3, 4, 5, 3, 4
Offset: 1

Views

Author

Peter Kagey, Apr 08 2018

Keywords

Comments

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

Examples

			a(14) = 4 because 14 * 15 * 16 * 18 * 20 * 21 has four distinct prime factors (2, 3, 5, and 7) and no other square product of a strictly increasing sequence starting at 14 and ending at 21 has fewer distinct prime factors.
		

Crossrefs

A092487 a(n) = least k such that {n+1, n+2, n+3, ... n+k} has a subset the product of whose members with n is a square.

Original entry on oeis.org

0, 4, 5, 0, 5, 6, 7, 7, 0, 8, 11, 8, 13, 7, 9, 0, 17, 9, 19, 10, 7, 11, 23, 8, 0, 13, 8, 12, 29, 12, 31, 13, 11, 17, 13, 0, 37, 19, 13, 10, 41, 14, 43, 11, 15, 23, 47, 6, 0, 13, 17, 13, 53, 16, 11, 16, 19, 29, 59, 15, 61, 31, 14, 0, 13, 14, 67, 17
Offset: 1

Views

Author

Don Reble, Apr 03 2004

Keywords

Comments

For n>1, n + a(n) is composite and n + a(n) is square if and only if n is square. - David A. Corneth, Oct 22 2016

Examples

			a(48)=6 because 48*(48+2)*(48+6) is a square, but you can't square 48 with numbers from (48+1) to (48+5).
		

References

  • R. K. Guy, Unsolved Problems in Number Theory, B30.

Crossrefs

Programs

  • Mathematica
    Table[k = 0; Which[IntegerQ@ Sqrt@ n, k, And[PrimeQ@ n, n > 3], k = n, True, While[Length@ Select[n Map[Times @@ # &, n + Rest@ Subsets@ Range@ k], IntegerQ@ Sqrt@ # &] == 0, k++]]; k, {n, 40}] (* Michael De Vlieger, Oct 26 2016 *)
    Table[k = 0; Which[IntegerQ@Sqrt@n, k, First@Last@FactorInteger@n > Sqrt[2 n] + 1, k = First@Last@FactorInteger@n, True, While[Length@Select[n Map[Times @@ # &, n + Rest@Subsets@Range@k], IntegerQ@Sqrt@# &] == 0, k++]]; k, {n, 100}] (* Joshua Stucky, Dec 05 2022 *)
  • PARI
    a(n) = {if(issquare(n),return(0)); if(isprime(n),if(n>3, return(n), return(n+2) )); my(l = List([n,n+1]), m=2); while(1, for(i=1, #l-2, forvec(v = vector(i, j, [2,#l-1]), if(issquare(l[1] * l[#l] * prod(k=1, #v, l[v[k]])), return(l[#l] - n)), 2)); listput(l,n+m);m++)} \\ David A. Corneth, Oct 22 2016

Formula

a(n) = A006255(n) - n. - Peter Kagey, Oct 22 2016
a(n^2) = 0, a(p) = p for prime p > 3. - David A. Corneth, Oct 22 2016

A277278 a(n) = smallest m for which there is a sequence n = b_1 < b_2 < ... < b_t = m such that b_1 + b_2 +...+ b_t is a perfect square.

Original entry on oeis.org

0, 1, 4, 6, 4, 10, 10, 9, 14, 9, 14, 13, 13, 18, 18, 18, 16, 19, 22, 23, 23, 27, 27, 26, 25, 25, 28, 33, 32, 35, 34, 33, 35, 38, 38, 40, 36, 42, 42, 42, 41, 48, 48, 47, 51, 50, 50, 49, 52, 49, 57, 57, 59, 59, 58, 58, 63, 63, 63, 62, 61, 66, 66, 67, 64, 73, 73
Offset: 0

Views

Author

Peter Kagey, Oct 15 2016

Keywords

Comments

Sum analog of R. L. Graham's sequence (A006255).

Examples

			a(0) = 0  via 0                  = 0^2
a(1) = 1  via 1                  = 1^2
a(2) = 4  via 2 + 3 + 4          = 3^2
a(3) = 6  via 3 + 6              = 3^2
a(4) = 4  via 4                  = 2^2
a(5) = 10 via 5 + 6 + 7 + 8 + 10 = 6^2
a(6) = 10 via 6 + 10             = 4^2
		

Crossrefs

Cf. A006255.

Programs

  • Haskell
    import Data.List (find)
    import Data.Maybe (fromJust)
    isSquare m = m == (integerRoot * integerRoot) where
    integerRoot = floor (sqrt (fromIntegral m)::Double)
    a277278 n
    | isSquare n = n
    | otherwise = last $ fromJust $ find (isSquare . sum) s where
    s = map ((n:) . map (n+)) a048793_tabf
    -- Peter Kagey, Oct 19 2016
  • PARI
    a(n)=if (issquare(n), return (n)); ok = 0; d = 1; while (!ok, for (j=1, 2^d-1, b = Vecrev(binary(j)); if (issquare(n+sum(k=1,#b, b[k]*(n+k))), ok = 1; break);); if (! ok, d++);); n+d; \\ Michel Marcus, Oct 16 2016
    

Formula

a(n^2) = n^2.

A277494 a(n) = smallest m for which there is a sequence n = b_1 < b_2 <= b_3 <= ... <= b_t = m such that b_1*b_2*...*b_t is a perfect cube.

Original entry on oeis.org

0, 1, 4, 6, 9, 10, 12, 14, 8, 16, 15, 22, 18, 26, 21, 20, 24, 34, 25, 38, 28, 30, 33, 46, 32, 35, 39, 27, 36, 58, 40, 62, 45, 44, 51, 42, 48, 74, 57, 52, 50, 82, 49, 86, 55, 54, 69, 94, 60, 56, 63, 68, 65, 106, 70, 66, 72, 76, 87, 118, 75, 122, 93, 77, 64, 78
Offset: 0

Views

Author

Peter Kagey, Oct 17 2016

Keywords

Comments

A cube analog of R. L. Graham's sequence (A006255).
Like R. L. Graham's sequence, this is a bijection between the natural numbers and the nonprimes.
a(p) = 2p for all primes p.

Examples

			a(0)  = 0  via 0                     =   0^3
a(1)  = 1  via 1                     =   1^3
a(2)  = 4  via 2 * 4                 =   2^3
a(3)  = 6  via 3 * 4^2 * 6^2         =  12^3
a(4)  = 9  via 4 * 6 * 9             =   6^3
a(5)  = 10 via 5 * 6 * 9 * 10^2      =  30^3
a(6)  = 12 via 6 * 9^2 * 12          =  18^3
a(7)  = 14 via 7 * 9^2 * 12^2 * 14^2 = 252^3
a(8)  = 8  via 8                     =   2^3
a(9)  = 16 via 9 * 12 * 16           =  12^3
a(10) = 15 via 10 * 12 * 15^2        =  30^3
		

Crossrefs

A359506 a(n) is the least integer m such that there exists a strictly increasing integer sequence n = b_1 < b_2 < ... < b_t = m with the property that b_1 XOR b_2 XOR ... XOR b_t = 0.

Original entry on oeis.org

0, 3, 5, 6, 7, 10, 9, 12, 11, 14, 13, 20, 15, 18, 17, 24, 19, 22, 21, 28, 23, 26, 25, 40, 27, 30, 29, 36, 31, 34, 33, 48, 35, 38, 37, 44, 39, 42, 41, 56, 43, 46, 45, 52, 47, 50, 49, 80, 51, 54, 53, 60, 55, 58, 57, 72, 59, 62, 61, 68, 63, 66, 65, 96, 67
Offset: 0

Views

Author

Peter Kagey, Jan 03 2023

Keywords

Comments

XOR is the bitwise XOR function, A003987.
This sequence is a bijection from the nonnegative integers to A057716, the nonpowers of 2.
Let's call the sequences mentioned in the definition as "zero-XOR sequences", and their last terms as "enders". a(n) is then the least possible ender for any zero-XOR sequence starting with n. - Antti Karttunen, Nov 25 2024

Examples

			For n = 19, a(19) = 28 with the sequence 19 XOR 20 XOR 27 XOR 28 = 0.
A table illustrating the first eleven terms:
   n |a(n)| sequence
  ---+----+-------------------
   0 |  0 |  0
   1 |  3 |  1 XOR  2 XOR  3
   2 |  5 |  2 XOR  3 XOR  4 XOR  5
   3 |  6 |  3 XOR  5 XOR  6
   4 |  7 |  4 XOR  5 XOR  6 XOR  7
   5 | 10 |  5 XOR  6 XOR  9 XOR 10
   6 |  9 |  6 XOR  7 XOR  8 XOR  9
   7 | 12 |  7 XOR 11 XOR 12
   8 | 11 |  8 XOR  9 XOR 10 XOR 11
   9 | 14 |  9 XOR 10 XOR 13 XOR 14
  10 | 13 | 10 XOR 11 XOR 12 XOR 13
		

Crossrefs

Cf. A003987, A057716, A359507, A359508, A378212 (a left inverse).
Cf. A006255, A275288, A277278, A277494, A300516, A329732 (variants of the theme).

Programs

  • Maple
    f:= proc(n) local k,S;
        S:= {n};
        for k from n+1 do
          S:= S union map(Bits:-Xor,S,k);
          if member(0,S) then return k fi;
        od;
    end proc:
    f(0):= 0:
    map(f, [$0..100]); # Robert Israel, Jan 12 2023
  • Mathematica
    f[n_] := Module[{k, S}, S = {n}; For[k = n+1, True, k++, S = S  ~Union~ BitXor[S, k]; If[MemberQ[S, 0], Return[k]]]];
    f[0] = 0;
    f /@ Range[0, 100] (* Jean-François Alcover, Jan 22 2023, after Robert Israel *)
  • PARI
    a(n)= if (n==0, return (0), my (x=[n],y); for (m=n+1, oo, if (vecmin(y=[bitxor(v,m) | v<-x])==0, return (m), x=setunion(x,Set(y)))))  \\ Rémy Sigrist, Jan 12 2023

Formula

For n > 1, a(n) >= n + 3. a(4n) = 4n + 3 for n > 0. Conjecture: a(n) <= 5(n+1)/3. - Charles R Greathouse IV, Jan 12 2023
For all n >= 0, A378212(a(n)) = n. - Antti Karttunen, Nov 25 2024

A245530 a(n) = smallest square which is the product of a minimal set of distinct numbers not less than n.

Original entry on oeis.org

1, 36, 144, 4, 400, 576, 784, 14400, 9, 32400, 4356, 3600, 6084, 1587600, 129600, 16, 10404, 11664, 23104, 14400, 15876, 17424, 33856, 20736, 25, 876096, 25401600, 1254400, 53824, 44100, 61504, 57600, 85377600, 4161600, 2822400, 36, 136900, 116964, 97344
Offset: 1

Views

Author

Reinhard Zumkeller, Jul 25 2014

Keywords

Comments

a(n) mod n = 0; a(n) mod A006255(n) = 0.

Crossrefs

Programs

  • Haskell
    a245530 = product . a245499_row
  • Mathematica
    Table[k = 0; While[Length@ # == 0 &@ Set[f, Select[Rest@ Subsets@ Range@ k, IntegerQ@ Sqrt[n (Times @@ # &[n + #])] &]], k++]; If[IntegerQ@ Sqrt@ n, k = {n}, k = n + Prepend[First@ f, 0]]; Times @@ k, {n, 22}] (* Michael De Vlieger, Oct 26 2016 *)

Formula

a(n) = Product_{k=1..A066400(n)} A245499(n,k), product of n-th row in A245499.
a(n) = A066401(n)^2.

A328045 a(n) = smallest m for which there is a sequence n = b_1 < b_2 < ... < b_t = m such that b_1^c_1*b_2^c_2*...*b_t^c_t is a fourth power, with all c_i < 4.

Original entry on oeis.org

0, 1, 4, 6, 4, 10, 9, 14, 15, 9, 18, 22, 20, 26, 21, 24, 16, 34, 27, 38, 25, 28, 33, 46, 30, 25, 39, 35, 36, 58, 40, 62, 42, 44, 51, 45, 36, 74, 57, 52, 49, 82, 50, 86, 55, 54, 69, 94, 54, 49, 63, 68, 65, 106, 70, 66, 64, 76, 87, 118, 75, 122, 93, 77, 64, 78
Offset: 0

Views

Author

Peter Kagey, Oct 02 2019

Keywords

Comments

a(n) = n if and only if n is a perfect square.
a(n) >= n + A300518(n) if n is not a perfect square.
a(n) <= A006255(n), and a(n) = A006255(n) except for when n is in A328218, a subsequence of A269045.

Examples

			For n = 1, a(1) = 1   with sequence 1                =  1^4.
For n = 2, a(2) = 4   with sequence 2^2 * 4          =  2^4.
For n = 3, a(3) = 6   with sequence 3^2 * 4   *  6^2 =  6^4.
For n = 4, a(4) = 4   with sequence 4^2              =  2^4.
For n = 5, a(5) = 10  with sequence 5   * 8^3 * 10^3 = 40^4.
For n = 6, a(6) = 9   with sequence 6^2 * 8^2 *  9   = 12^4.
For n = 7, a(7) = 14  with sequence 7^2 * 8^2 * 14^2 = 28^4.
		

Crossrefs

Cf. A006255 (square), A277494 (cube).

A275288 Least k such that there exists a sequence b_1 < b_2 < ... < b_t = k that includes n and has a reciprocal sum of 1.

Original entry on oeis.org

1, 6, 6, 12, 20, 6, 28, 24, 18, 15, 33, 12, 65, 28, 15, 48, 85, 18, 76, 20, 28, 33, 115, 24, 100, 52, 54, 28, 145, 30, 217, 96, 33, 85, 35, 36, 296, 95, 52, 40, 246, 42, 301, 55, 45, 138, 329, 48, 196, 75, 102, 52, 371, 54, 55, 56, 76, 174, 531, 60, 305, 155
Offset: 1

Views

Author

Peter Kagey, Aug 18 2016

Keywords

Comments

From Robert Price, Jan 04 2017: (Start)
a(11) = 33 [2,3,11,22,33]
65 >= a(13) > 26 [2,3,13,26,52,60,65]; no better solution with fewer than 15 terms.
48 >= a(16) > 32 [2,3,16,18,36,48]; no better solution with fewer than 24 terms.
85 >= a(17) > 34 [2,3,15,17,34,85]; no better solution with fewer than 12 terms.
76 >= a(19) > 19 [2,3,12,19,57,76]; no better solution with fewer than 12 terms.
a(20) = 20 [2,4,5,20]
a(21) = 28 [2,4,8,21,24,28]
a(22) = 33 [2,4,11,20,22,30,33]
115 >= a(23) > 23 [2,3,10,23,69,115]; no better solution with fewer than 11 terms.
a(24) = 24 [2,3,8,24]
100 >= a(25) > 25 [2,3,10,25,60,100]; no better solution with fewer than 11 terms.
52 >= a(26) > 26 [2,3,12,26,39,52]; no better solution with fewer than 16 terms.
54 >= a(27) > 27 [2,3,12,27,36,54]; no better solution with fewer than 9 terms.
a(28) = 28 [2,3,12,21,28]
145 >= a(29) > 29 [2,4,5,29,116,145]; no better solution with fewer than 9 terms.
a(30) = 30 [2,3,12,20,30]
217 >= a(31) > 31 [2,3,9,31,93,126,217]; no better solution with fewer than 9 terms.
96 >= a(32) > 32 [2,3,9,32,72,96]; no better solution with fewer than 11 terms.
a(33) = 33 [2,3,11,22,33]
85 >= a(34) > 34 [2,3,17,20,34,60,85]; no better solution with fewer than 9 terms.
a(35) = 35 [2,3,14,15,35]
a(36) = 36 [2,3,12,18,36]
296 >= a(37) > 37 [2,3,8,37,148,222,296]; no better solution with fewer than 8 terms.
95 >= a(38) > 38 [2,4,5,38,76,95]; no better solution with fewer than 11 terms.
52 >= a(39) > 39 [2,4,6,26,39,52]; no better solution with fewer than 15 terms.
a(40) = 40 [2,3,10,24,40]
246 >= a(41) > 41 [2,3,8,41,120,205,246]; no better solution with fewer than 9 terms.
a(42) = 42 [2,3,7,42]
192 >= a(64) [2,3,8,48,64,192]; no better solution with fewer than 9 terms.
162 >= a(81) [2,3,8,72,81,108,162]; no better solution with fewer than 9 terms.
384 >= a(128) [2,3,7,96,128,336,384]; no better solution with fewer than 8 terms.
486 >= a(243) [2,3,7,81,243,336,432,486]; no better solution with fewer than 9 terms.
a(216) = 216 [2,3,8,27,216]
196 >= a(49) [2,3,8,49,98,168,196]; no better solution with fewer than 8 terms.
a(100) = 100 [2,4,5,25,100]
363 >= a(121) [2,3,7,121,176,242,336,363]; no better solution with fewer than 8 terms.
a(144) = 144 [2,3,7,112,126,144]
a(196) = 196 [2 ,3,7,84,147,196]
a(225) = 225 [2,3,9,25,90,225]
a(500) = 500 [2,4,5,25,125,500]
It appears that in most cases a(n) is a small multiple of n. For example: a(8)=3*8, a(11)=3*11, a(35)=1*35.
If not a small multiple of n, then a small rational times n. For example: a(10)=3/2*10, a(21)=4/3*21, a(22)=3/2*22.
Conjectures:
a(2^n) = 3*n
a(3^n) = 2*n
a(5^n) = 4*n
a(6^n) = n
a(7^n) = 4*n
(End)
From Peter Kagey, Jul 20 2017: (Start)
a(n) = n if and only if n is in A092671.
Every term in this sequence is in A092671.
a(a(n)) = a(n); that is, this sequence is idempotent.
(End)
From Jon E. Schoenfield, Feb 15 2020: (Start)
For any n > 1, let P be the largest divisor of n that is either a prime (p) or prime power (p^e, where e > 1). Then a(n) >= m*P where m is the smallest integer such that p divides the numerator of the sum of some subset of the set of unit fractions {1/1, 1/2, 1/3, ..., 1/m} that includes 1/(n/P).
Conjecture (confirmed for all n <= 40000): for all n > 1, the lower bound given above is tight, i.e., a(n) = m*P where m and P are as defined above. (See Example section.) (End)

Examples

			a(1)  =  1 via [1]
a(2)  =  6 via [2, 3, 6]
a(3)  =  6 via [2, 3, 6]
a(4)  = 12 via [2, 4, 6, 12]
a(5)  = 20 via [2, 4, 5, 20]
a(6)  =  6 via [2, 3, 6]
a(7)  = 28 via [2, 4, 7, 14, 28]
a(8)  = 24 via [2, 3, 8, 24]
a(9)  = 18 via [2, 3, 9, 18]
a(10) = 15 via [2, 3, 10, 15]
a(11) > 30
a(12) = 12 via [2, 4, 6, 12]
a(13) > 30
a(14) = 28 via [2, 4, 7, 14, 28]
a(15) = 15 via [2, 3, 10, 15]
a(16) > 30
a(17) > 30
a(18) = 18 via [2, 3, 9, 18]
From _Jon E. Schoenfield_, Feb 15 2020: (Start)
For n=31, the largest prime or prime power divisor of n is P=31, and the set of unit fractions {1/1, 1/2, 1/3, 1/4, 1/5, 1/6} has no subset sum that includes 1/(n/P) = 1/1 and has a numerator divisible by 31, but the set of unit fractions {1/1, 1/2, 1/3, 1/4, 1/5, 1/6, 1/7} does have such a subset sum, namely, 1/1 + 1/3 + 1/7 = 31/21, so a(31) >= 7*31 = 217. In fact, the numbers 1*31=31, 3*31=93, and 7*31=217 are elements of many sets of integers that include n=31, include no element > 217, and have a reciprocal sum of 1 (one such set is {2,3,12,28,31,93,217}), so a(31)=217.
For n=62, the largest prime or prime power divisor of n is again P=31, and the set of unit fractions {1/1, 1/2, 1/3, 1/4} has no subset sum that includes 1/(n/P) = 1/2 and has a numerator divisible by 31, but the set of unit fractions {1/1, 1/2, 1/3, 1/4, 1/5} does have such a subset sum, namely, 1/2 + 1/3 + 1/5 = 31/30, so a(62) >= 5*31 = 155. In fact, the numbers 2*31=62, 3*31=93, and 5*31=155 are elements of many sets of integers that include n=62, include no element > 155, and have a reciprocal sum of 1 (one such set is {2,3,12,20,62,93,155}), so a(62)=155.
(End)
		

Crossrefs

Programs

  • Mathematica
    Table[SelectFirst[Range@ 20, MemberQ[Map[Total, 1/DeleteCases[Rest@ Subsets[Range@ #, #], w_ /; FreeQ[w, n]]], 1] &] /. k_ /; MissingQ@ k -> 0, {n, 12}] (* Michael De Vlieger, Aug 18 2016, Version 10.2, values of a(n) > 20 appear as 0 *)

Extensions

a(11)-a(12) from Robert Price, Jan 07 2017
a(13)-a(58) from David A. Corneth, Jul 20 2017
a(59)-a(62) from Jon E. Schoenfield, Feb 15 2020
Previous Showing 11-20 of 30 results. Next