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

A257815 Inverse permutation of A064364, when seen as flattened list.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 9, 7, 8, 10, 24, 11, 37, 15, 12, 13, 82, 14, 118, 16, 19, 38, 232, 17, 20, 56, 18, 25, 574, 21, 759, 22, 46, 119, 30, 23, 1663, 167, 68, 26, 2700, 31, 3408, 57, 27, 318, 5338, 28, 47, 32, 141, 83, 10078, 29, 69, 39, 197, 760, 18312, 33, 22180
Offset: 1

Views

Author

Reinhard Zumkeller, Jun 11 2015

Keywords

Crossrefs

Cf. A064364.

Programs

  • Haskell
    import Data.List (elemIndex); import Data.Maybe (fromJust)
    a257815 = (+ 1) . fromJust . (`elemIndex` a064364_list)

Extensions

More terms from Alois P. Heinz, Jun 25 2015

A376302 Smallest powerful m in row n of A064364, or -1 if none exist.

Original entry on oeis.org

1, -1, -1, 4, -1, 8, -1, 16, 27, 25, -1, 64, 108, 49, 125, 200, 432, 196, 500, 392, 343, 121, 1323, 1225, 1372, 169, 2744, 968, 5488, 676, 3267, 1352, 1331, 289, 4563, 4225, 5324, 361, 2197, 2312, 21125, 1444, 7803, 2888, 17576, 529, 9747, 9025, 36125, 2116, 4913
Offset: 1

Views

Author

Michael De Vlieger, Sep 19 2024

Keywords

Comments

Powerful numbers here refers to A001694.

Examples

			First 13 rows of A064364 indicating the smallest powerful number in each row with brackets and other powerful numbers in parentheses. Rows 2, 3, 5, 7, and 11 do not have powerful numbers.
   n   Row n of A064364
  -------------------------------------------------
   1:  [1]
   2:   2
   3:   3
   4:  [4]
   5:   5    6
   6:  [8]  (9)
   7:   7   10   12
   8:  15  [16]  18
   9:  14   20   24 [27]
  10:  21  [25]  30   32  (36)
  11:  11   28   40   45   48   54
  12:  35   42   50   60  [64]  72  (81)
  13:  13   22   56   63   75   80   90   96  [108]
		

Crossrefs

Cf. A001414, A001694, A064364, A363266 (largest squarefree m in row n of A064364).

Programs

  • Mathematica
    s = With[{nn = 40000}, Union@ Flatten@ Table[a^2*b^3, {b, Surd[nn, 3]},
      {a, Sqrt[nn/b^3]}]];
    Insert[#, -1, Map[List, {2, 2, 3, 4, 7}]] &@
      s[[Values[#[[7 ;; 7 + LengthWhile[Differences@
      Keys[#][[7 ;; -1]], # == 1 &] ]] ][[All, 1]] ]] &@
      KeySort@ PositionIndex@
      Map[Total@ Flatten[ConstantArray[#1, #2] & @@@ FactorInteger[#]] &, s]

A303645 Duplicate of A064364.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 8, 9, 7, 10, 12, 15, 16, 18, 14, 20, 24, 27, 21, 25, 30, 32, 36, 11
Offset: 1

Views

Author

Keywords

A000792 a(n) = max{(n - i)*a(i) : i < n}; a(0) = 1.

Original entry on oeis.org

1, 1, 2, 3, 4, 6, 9, 12, 18, 27, 36, 54, 81, 108, 162, 243, 324, 486, 729, 972, 1458, 2187, 2916, 4374, 6561, 8748, 13122, 19683, 26244, 39366, 59049, 78732, 118098, 177147, 236196, 354294, 531441, 708588, 1062882, 1594323, 2125764, 3188646, 4782969, 6377292
Offset: 0

Views

Author

Keywords

Comments

Numbers of the form 3^k, 2*3^k, 4*3^k with a(0) = 1 prepended.
If a set of positive numbers has sum n, this is the largest value of their product.
In other words, maximum of products of partitions of n: maximal value of Product k_i for any way of writing n = Sum k_i. To find the answer, take as many of the k_i's as possible to be 3 and then use one or two 2's (see formula lines below).
a(n) is also the maximal size of an Abelian subgroup of the symmetric group S_n. For example, when n = 6, one of the Abelian subgroups with maximal size is the subgroup generated by (123) and (456), which has order 9. [Bercov and Moser] - Ahmed Fares (ahmedfares(AT)my-deja.com), Apr 19 2001
Also the maximum number of maximal cliques possible in a graph with n vertices (cf. Capobianco and Molluzzo). - Felix Goldberg (felixg(AT)tx.technion.ac.il), Jul 15 2001 [Corrected by Jim Nastos and Tanya Khovanova, Mar 11 2009]
Every triple of alternate terms {3*k, 3*k+2, 3*k+4} in the sequence forms a geometric progression with first term 3^k and common ratio 2. - Lekraj Beedassy, Mar 28 2002
For n > 4, a(n) is the least multiple m of 3 not divisible by 8 for which omega(m) <= 2 and sopfr(m) = n. - Lekraj Beedassy, Apr 24 2003
Maximal number of divisors that are possible among numbers m such that A080256(m) = n. - Lekraj Beedassy, Oct 13 2003
Or, numbers of the form 2^p*3^q with p <= 2, q >= 0 and 2p + 3q = n. Largest number obtained using only the operations +,* and () on the parts 1 and 2 of any partition of n into these two summands where the former exceeds the latter. - Lekraj Beedassy, Jan 07 2005
a(n) is the largest number of complexity n in the sense of A005520 (A005245). - David W. Wilson, Oct 03 2005
a(n) corresponds also to the ultimate occurrence of n in A001414 and thus stands for the highest number m such that sopfr(m) = n, for n >= 2. - Lekraj Beedassy, Apr 29 2002
a(n) for n >= 1 is a paradigm shift sequence with procedural length p = 0, in the sense of A193455. - Jonathan T. Rowell, Jul 26 2011
a(n) = largest term of n-th row in A212721. - Reinhard Zumkeller, Jun 14 2012
For n >= 2, a(n) is the largest number whose prime divisors (with multiplicity) add to n, whereas the smallest such number (resp. smallest composite number) is A056240(n) (resp. A288814(n)). - David James Sycamore, Nov 23 2017
For n >= 3, a(n+1) = a(n)*(1 + 1/s), where s is the smallest prime factor of a(n). - David James Sycamore, Apr 10 2018

Examples

			a{8} = 18 because we have 18 = (8-5)*a(5) = 3*6 and one can verify that this is the maximum.
a(5) = 6: the 7 partitions of 5 are (5), (4, 1), (3, 2), (3, 1, 1), (2, 2, 1), (2, 1, 1, 1), (1, 1, 1, 1, 1) and the corresponding products are 5, 4, 6, 3, 4, 2 and 1; 6 is the largest.
G.f. = 1 + x + 2*x^2 + 3*x^3 + 4*x^4 + 6*x^5 + 9*x^6 + 12*x^7 + 18*x^8 + ...
		

References

  • B. R. Barwell, Cutting String and Arranging Counters, J. Rec. Math., 4 (1971), 164-168.
  • B. R. Barwell, Journal of Recreational Mathematics, "Maximum Product": Solution to Prob. 2004;25(4) 1993, Baywood, NY.
  • M. Capobianco and J. C. Molluzzo, Examples and Counterexamples in Graph Theory, p. 207. North-Holland: 1978.
  • S. L. Greitzer, International Mathematical Olympiads 1959-1977, Prob. 1976/4 pp. 18;182-3 NML vol. 27 MAA 1978
  • J. L. Gross and J. Yellen, eds., Handbook of Graph Theory, CRC Press, 2004; p. 396.
  • P. R. Halmos, Problems for Mathematicians Young and Old, Math. Assoc. Amer., 1991, pp. 30-31 and 188.
  • L. C. Larson, Problem-Solving Through Problems. Problem 1.1.4 pp. 7. Springer-Verlag 1983.
  • D. J. Newman, A Problem Seminar. Problem 15 pp. 5;15. Springer-Verlag 1982.
  • 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

See A007600 for a left inverse.
Cf. array A064364, rightmost (nonvanishing) numbers in row n >= 2.
See A056240 and A288814 for the minimal numbers whose prime factors sums up to n.
A000792, A178715, A193286, A193455, A193456, and A193457 are closely related as paradigm shift sequences for (p = 0, ..., 5 respectively).
Cf. A202337 (subsequence).

Programs

  • Haskell
    a000792 n = a000792_list !! n
    a000792_list = 1 : f [1] where
       f xs = y : f (y:xs) where y = maximum $ zipWith (*) [1..] xs
    -- Reinhard Zumkeller, Dec 17 2011
    
  • Magma
    I:=[1,1,2,3,4]; [n le 5 select I[n] else 3*Self(n-3): n in [1..45]]; // Vincenzo Librandi, Apr 14 2015
  • Maple
    A000792 := proc(n)
        m := floor(n/3) ;
        if n mod 3 = 0 then
            3^m ;
        elif n mod 3 = 1 then
            4*3^(m-1) ;
        else
            2*3^m ;
        end if;
        floor(%) ;
    end proc: # R. J. Mathar, May 26 2013
  • Mathematica
    a[1] = 1; a[n_] := 4* 3^(1/3 *(n - 1) - 1) /; (Mod[n, 3] == 1 && n > 1); a[n_] := 2*3^(1/3*(n - 2)) /; Mod[n, 3] == 2; a[n_] := 3^(n/3) /; Mod[n, 3] == 0; Table[a[n], {n, 0, 40}]
    CoefficientList[Series[(1 + x + 2x^2 + x^4)/(1 - 3x^3), {x, 0, 50}], x] (* Harvey P. Dale, May 01 2011 *)
    f[n_] := Max[ Times @@@ IntegerPartitions[n, All, Prime@ Range@ PrimePi@ n]]; f[1] = 1; Array[f, 43, 0] (* Robert G. Wilson v, Jul 31 2012 *)
    a[ n_] := If[ n < 2, Boole[ n > -1], 2^Mod[-n, 3] 3^(Quotient[ n - 1, 3] + Mod[n - 1, 3] - 1)]; (* Michael Somos, Jan 23 2014 *)
    Join[{1, 1}, LinearRecurrence[{0, 0, 3}, {2, 3, 4}, 50]] (* Jean-François Alcover, Jan 08 2019 *)
    Join[{1,1},NestList[#+Divisors[#][[-2]]&,2,41]] (* James C. McMahon, Aug 09 2024 *)
  • PARI
    {a(n) = floor( 3^(n - 4 - (n - 4) \ 3 * 2) * 2^( -n%3))}; /* Michael Somos, Jul 23 2002 */
    
  • PARI
    lista(nn) = {print1("1, 1, "); print1(a=2, ", "); for (n=1, nn, a += a/divisors(a)[2]; print1(a, ", "););} \\ Michel Marcus, Apr 14 2015
    
  • PARI
    A000792(n)=if(n>1,3^((n-2)\3)*(2+(n-2)%3),1) \\ M. F. Hasler, Jan 19 2019
    

Formula

G.f.: (1 + x + 2*x^2 + x^4)/(1 - 3*x^3). - Simon Plouffe in his 1992 dissertation.
a(3n) = 3^n; a(3*n+1) = 4*3^(n-1) for n > 0; a(3*n+2) = 2*3^n.
a(n) = 3*a(n-3) if n > 4. - Henry Bottomley, Nov 29 2001
a(n) = n if n <= 2, otherwise a(n-1) + Max{gcd(a(i), a(j)) | 0 < i < j < n}. - Reinhard Zumkeller, Feb 08 2002
A007600(a(n)) = n; Andrew Chi-Chih Yao attributes this observation to D. E. Muller. - Vincent Vatter, Apr 24 2006
a(n) = 3^(n - 2 - 2*floor((n - 1)/3))*2^(2 - (n - 1) mod 3) for n > 1. - Hieronymus Fischer, Nov 11 2007
From Kiyoshi Akima (k_akima(AT)hotmail.com), Aug 31 2009: (Start)
a(n) = 3^floor(n/3)/(1 - (n mod 3)/4), n > 1.
a(n) = 3^(floor((n - 2)/3))*(2 + ((n - 2) mod 3)), n > 1. (End)
a(n) = (2^b)*3^(C - (b + d))*(4^d), n > 1, where C = floor((n + 1)/3), b = max(0, ((n + 1) mod 3) - 1), d = max(0, 1 - ((n + 1) mod 3)). - Jonathan T. Rowell, Jul 26 2011
G.f.: 1 / (1 - x / (1 - x / (1 + x / (1 - x / (1 + x / (1 + x^2 / (1 + x))))))). - Michael Somos, May 12 2012
3*a(n) = 2*a(n+1) if n > 1 and n is not divisible by 3. - Michael Somos, Jan 23 2014
a(n) = a(n-1) + largest proper divisor of a(n-1), n > 2. - Ivan Neretin, Apr 13 2015
a(n) = max{a(i)*a(n-i) : 0 < i < n} for n >= 4. - Jianing Song, Feb 15 2020
a(n+1) = a(n) + A038754(floor( (2*(n-1) + 1)/3 )), for n > 1. - Thomas Scheuerle, Oct 27 2022

Extensions

More terms and better description from Therese Biedl (biedl(AT)uwaterloo.ca), Jan 19 2000

A056240 Smallest number whose prime divisors (taken with multiplicity) add to n.

Original entry on oeis.org

2, 3, 4, 5, 8, 7, 15, 14, 21, 11, 35, 13, 33, 26, 39, 17, 65, 19, 51, 38, 57, 23, 95, 46, 69, 92, 115, 29, 161, 31, 87, 62, 93, 124, 155, 37, 217, 74, 111, 41, 185, 43, 123, 86, 129, 47, 215, 94, 141, 188, 235, 53, 329, 106, 159, 212, 265, 59, 371, 61, 177, 122
Offset: 2

Views

Author

Adam Kertesz, Aug 19 2000

Keywords

Comments

a(n) is the index of first occurrence of n in A001414.
From David James Sycamore and Michel Marcus, Jun 16 2017, Jun 28 2017: (Start)
Recursive calculation of a(n):
For prime p, a(p) = p.
For even composite n, let P_n denote the largest prime < n-1 such that n-P_n is prime (except if n = 6).
For odd composite n, let P_n denote the largest prime < n-1 such that n-3-P_n is prime.
Conjecture: a(n) = min { q*a(n-q); q prime, P_n <= q < n-1 }.
Examples:
For n = 9998, P_9998 = 9967 and a(9998) = min { 9973*a(25), 9967*a(31) } = 9967*31 = 308977.
For n = 875, P_875 = 859 and a(875) = min { 863*a(12), 859*a(16) } = 863*35 = 30205.
Note: A000040 and A288313 are both subsequences of this sequence. (End)

Examples

			a(8) = 15 = 3*5 because 15 is the smallest number whose prime divisors sum to 8.
a(10000) = 586519: Let pp(n) be the largest prime < n and the candidate being the current value that might be a(10000). Then we see that pp(10000 - 1) = 9973, giving a candidate 9973 * a(10000 - 9973) = 9973 * 92. pp(9973) = 9967, giving a candidate 9967 * a(10000 - 9967) = 9967 * 62. pp(9967) = 9949, giving the candidate 9949 * a(10000 - 9949) = 9962 * 188. This is larger than our candidate so we keep 9967 * 62 as our candidate. pp(9949) = 9941, giving a candidate 9941 * pp(10000 - 9941) = 9941 * 59. We see that (n - p) * a(p) >= (n - p) * p > candidate = 9941 * 59 for p > 59 so we stop iterating to conclude a(10000) = 9941 * 59 = 586519. - _David A. Corneth_, Mar 23 2018, edited by _M. F. Hasler_, Jan 19 2019
		

Crossrefs

First column of array A064364, n>=2.
See A000792 for the maximal numbers whose prime factors sums up to n.

Programs

  • Haskell
    a056240 = (+ 1) . fromJust . (`elemIndex` a001414_list)
    -- Reinhard Zumkeller, Jun 14 2012
    
  • Maple
    A056240 := proc(n)
        local k ;
        for k from 1 do
            if A001414(k) = n then
                return k ;
            end if;
        end do:
    end proc:
    seq(A056240(n),n=2..80) ; # R. J. Mathar, Apr 15 2024
  • Mathematica
    a = Table[0, {75}]; Do[b = Plus @@ Flatten[ Table[ #1, {#2}] & @@@ FactorInteger[n]]; If[b < 76 && a[[b]] == 0, a[[b]] = n], {n, 2, 1000}]; a (* Robert G. Wilson v, May 04 2002 *)
    b[n_] := b[n] = Total[Times @@@ FactorInteger[n]];
    a[n_] := For[k = 2, True, k++, If[b[k] == n, Return[k]]];
    Table[a[n], {n, 2, 63}] (* Jean-François Alcover, Jul 03 2017 *)
  • PARI
    isok(k, n) = my(f=factor(k)); sum(j=1, #f~, f[j,1]*f[j,2]) == n;
    a(n) = my(k=2); while(!isok(k, n), k++); k; \\ Michel Marcus, Jun 21 2017
    
  • PARI
    a(n) = {if(n < 7, return(n + 2*(n==6))); my(p = precprime(n), res); if(p == n, return(p), p = precprime(n - 2); res = p * a(n - p); while(res > (n - p) * p && p > 2, p = precprime(p - 1); res = min(res, a(n - p) * p)); res)} \\ David A. Corneth, Mar 23 2018
    
  • PARI
    A056240(n, p=n-1, m=oo)=if(n<6 || isprime(n), n, n==6, 8, until(p<3 || (n-p=precprime(p-1))*p >= m=min(m,A056240(n-p)*p),); m) \\ M. F. Hasler, Jan 19 2019

Formula

Trivial but essential: a(n) >= n. - David A. Corneth, Mar 23 2018
a(n) >= n with equality iff n = 4 or n is prime. - M. F. Hasler, Jan 19 2019

Extensions

More terms from James Sellers, Aug 25 2000

A002098 G.f.: 1/Product_{k>=1} (1-prime(k)*x^prime(k)).

Original entry on oeis.org

1, 0, 2, 3, 4, 11, 17, 29, 49, 85, 144, 226, 404, 603, 1025, 1679, 2558, 4201, 6677, 10190, 16599, 25681, 39643, 61830, 96771, 147114, 228338, 352725, 533291, 818624, 1263259, 1885918, 2900270, 4396577, 6595481, 10040029, 15166064, 22642064
Offset: 0

Views

Author

Keywords

Comments

a(n) is sum of all numbers k for which A001414(k), the sum of prime factors with repetition, equals n. See Havermann's link. - J. M. Bergot, Jun 14 2013

References

  • S.M. Kerawala, On a Pair of Arithmetic Functions Analogous to Chawla's Pair, J. Natural Sciences and Mathematics, 9 (1969), circa p. 103.
  • 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

Row sums of A064364, A116864.

Programs

  • Maple
    b:= proc(n,i) option remember;
          if n<0 then 0
        elif n=0 then 1
        elif i=0 then 0
        else b(n, i-1) +b(n-ithprime(i), i) *ithprime(i)
          fi
        end:
    a:= n-> b(n, numtheory[pi](n)):
    seq(a(n), n=0..40);  # Alois P. Heinz, Nov 20 2010
  • Mathematica
    b[n_, i_] := b[n, i] = Which[n<0, 0, n==0, 1, i==0, 0, True, b[n, i-1] + b[n - Prime[i], i]*Prime[i]]; a[n_] := b[n, PrimePi[n]]; Table[a[n], {n, 0, 40}] (* Jean-François Alcover, Feb 19 2016, after Alois P. Heinz *)
    With[{nn=40},CoefficientList[Series[1/Product[1-Prime[k]x^Prime[k],{k,nn}],{x,0,nn}],x]] (* Harvey P. Dale, Jun 20 2021 *)
  • PARI
    my(N=40, x='x+O('x^N)); Vec(1/prod(k=1, N, 1-isprime(k)*k*x^k)) \\ Seiichi Manyama, Feb 27 2022

Extensions

Better description and more terms from Vladeta Jovovic, May 09 2003

A178595 Natural numbers sorted by the sum of square roots of prime factors.

Original entry on oeis.org

1, 2, 3, 5, 7, 4, 6, 11, 9, 13, 10, 15, 14, 17, 8, 19, 21, 25, 12, 22, 23, 18, 35, 26, 33, 20, 27, 49, 39, 30, 29, 28, 34, 55, 31, 16, 45, 38, 42, 65, 51, 50, 77, 24, 37, 57, 63, 44, 75, 46, 91, 36, 70, 85, 41, 52, 66, 40, 69, 43, 95, 54, 105, 121, 98, 125, 78, 119, 99, 60, 58
Offset: 1

Views

Author

Joonas Pohjonen, May 30 2010

Keywords

Comments

Prime factors counted with multiplicity. - Harvey P. Dale, May 20 2023

Crossrefs

Similarly defined sequences: A064364, A168521.

Programs

  • Mathematica
    SortBy[Table[{n,Total[N[Sqrt[Flatten[Table[#[[1]],#[[2]]]&/@FactorInteger[n]]]]]},{n,150}],Last][[;;,1]] (* Harvey P. Dale, May 20 2023 *)

Formula

For n >= 1, Sum_{k=1..A001222(a(n))} sqrt(A027746(a(n),k)) < Sum_{k=1..A001222(a(n+1))} sqrt(A027746(a(n+1),k)). - Peter Munn, Aug 17 2022

A376147 a(1)=1, followed by array T(n,k), n>=1, k>=2 read by antidiagonals (downwards) wherein the first row is A056240, and the k-th column records in ascending order the numbers m such that A001414(m) = k.

Original entry on oeis.org

1, 2, 3, 4, 5, 8, 6, 7, 9, 15, 10, 14, 16, 12, 21, 20, 18, 11, 25, 24, 35, 28, 30, 27, 13, 42, 40, 32, 33, 22, 50, 45, 36, 26, 49, 56, 60, 48, 39, 44, 70, 63, 64, 54, 17, 55, 105, 84, 75, 72, 65, 52, 66, 112, 100, 80, 81, 19, 77, 88, 98, 125, 120, 90, 51, 34, 78
Offset: 1

Views

Author

David James Sycamore, Sep 12 2024

Keywords

Comments

The columns of T(n,k) are of finite length, corresponding to A000607(k), whereas the rows are of infinite length. This is a permutation of A064364 (which reads 1 plus the consecutive columns of T(n,k)), and hence of the positive integers A000027.

Examples

			Construct the irregular table T(n,k) as follows:
The first row T(1,k) is A056240, smallest number whose sum of prime divisors (with multiplicity) is k (k>=2).  The second row T(2,k) is the second smallest number (if it exists) whose sum of prime divisors is k, and so on. The k-th column is then the ordered list of the A000607(k) numbers (k>=2) whose prime divisors sum to k, the final term of which is A000792(k), after which the k-th column contains no further terms. The sum of the terms in the k-th column (k>=2) is A002098(k).
Read the table T(n,k) by antidiagonals downwards to obtain the data:
  2, 3, 4, 5, 8, 7, 15, 14, 21, 11, 35, 13.. (A056240)
           6, 9,10, 16, 20, 25, 28, 42, 22..
                12, 18, 24, 30, 40, 50, 56..
                        27, 32, 45, 60, 63..
                            36, 48, 64, 75..
                                54, 72, 80..
                                    81, 90..
And so on…
		

Crossrefs

Programs

  • Mathematica
    kk = 30;
    MapIndexed[Set[t[First[#2]], #1] &,
      Rest@ CoefficientList[
        Series[(1 + x + 2 x^2 + x^4)/(1 - 3 x^3), {x, 0, kk}], x] ];
    Array[Set[r[#],
      Total@ Flatten[ConstantArray[#1, #2] & @@@ FactorInteger[#]]] &, t[kk]];
    s = Table[
      Select[Range[Prime@ PrimePi[k], t[k]], r[#] == k &], {k, 2, kk}];
    Join[{1}, s[[1]],
      Table[i = 1; m = n;
        Reap[While[And[m > 1, Length@ s[[m]] >= i], Sow[s[[m, i]] ]; m--;
    i++]][[-1, 1]], {n, 2, kk - 1}] ] // Flatten (* Michael De Vlieger, Sep 18 2024 *)

A168521 Sort numbers by value of sum of squares of prime factors (cf. A067666). Break ties by putting smaller numbers first. Begin with 0, 1.

Original entry on oeis.org

0, 1, 2, 4, 3, 8, 6, 16, 12, 9, 32, 24, 18, 64, 5, 48, 36, 27, 128, 10, 96, 72, 54, 256, 20, 192, 15, 144, 108, 81, 512, 40, 384, 30, 288, 216, 162, 1024, 80, 768, 60, 576, 45, 432, 324, 2048, 160, 243, 1536, 120, 1152, 90, 864, 648, 4096, 7, 320, 486, 3072, 25, 240
Offset: 1

Views

Author

Keith Flower (keith.flower(AT)gmail.com), Nov 28 2009

Keywords

Comments

Represent each number m by a corresponding point, P_m, in Euclidean space, such that the prime factors of m are the co-ordinates of P_m. In this sequence, the numbers appear in order of distance from the origin of their corresponding points.

Examples

			For m = 7, distance d from the origin of P_7 is 7, for m = 8192 (P_8192 = [2,2,2,2,2,2,2,2,2,2,2,2,2]) d = sqrt(13*2^2) = 7.211102550927978. So 7 appears before 8192.
Explanatory table for initial terms:
  n  a(n)   P_{a(n)}
  1    0                (appears here as prescribed)
  2    1                (appears here as prescribed)
                      Calculation of d^2
  3    2 -> [2]       -> 2^2 = 4
  4    4 -> [2,2]     -> 2^2 + 2^2 = 8
  5    3 -> [3]       -> 3^3 = 9
  6    8 -> [2,2,2]   -> 2^2 + 2^2 + 2^2 = 12
  7    6 -> [2,3]     -> 2^2 + 3^2 = 13
  8   16 -> [2,2,2,2] -> 2^2 + 2^2 + 2^2 + 2^2 = 16
  9   12 -> [2,2,3]   -> 2^2 + 2^2 + 3^2 = 17
		

Crossrefs

Similarly defined sequences: A064364, A178595.

Formula

For n >= 2, Sum_{k=1..A001222(a(n))} A027746(a(n),k)^2 <= Sum_{k=1..A001222(a(n+1))} A027746(a(n+1),k)^2. - Peter Munn, Aug 17 2022

Extensions

Definition edited by N. J. A. Sloane, Nov 29 2009
It would also be worthwhile computing the companion sequence where ties are broken according to lexicographic order of the lists of prime factors (so that 48 would come before 5, instead of after). - N. J. A. Sloane, Nov 29 2009
More terms from R. J. Mathar, Jan 25 2010
Edited by Peter Munn, Aug 17 2022

A267000 a(n) is the smallest m such that A001414(m)=n and ((m=0) mod n) and m/n is both squarefree and prime to n, or 0 if no such m exists.

Original entry on oeis.org

2, 3, 4, 5, 0, 7, 0, 0, 30, 11, 60, 13, 70, 105, 240, 17, 0, 19, 220, 231, 0, 23, 0, 650, 286, 1755, 476, 29, 2730, 31, 1824, 627, 3570, 805, 4788, 37, 646, 897, 1160, 41, 8778, 43, 1276, 11385, 8970, 47, 1776, 36309, 10850, 1581, 41860, 53, 2322, 4070, 2408, 45885, 16530, 59
Offset: 2

Views

Author

Michel Marcus, Jan 08 2016

Keywords

Comments

The offset is 2 like A056240 since there is no number m with A001414(m) = 1
Alladi and Erdős state that there is only a finite number of zeros in this sequence.
When a(n) is not zero, A056240(n) <= a(n); a(n) <= A000792(n).

Examples

			a(10) = 30 since A001414(30)=10 and 30 is divisible by 10, and 30/10=3 is squarefree and prime to 10.
		

Crossrefs

Programs

  • PARI
    sopfr(n) = {my(f=factor(n)); sum(k=1, #f~, f[k, 1]*f[k, 2]); }
    first(n) = {my(k=1); while (sopfr(k) != n, k++); k;}
    last(n) = polcoeff((1+x+2*x^2+x^4)/(1-3*x^3) + O(x^(n + 3)), n);
    a(n) = {na = first(n); nb = last(n); for (m=na, nb, if ((sopfr(m) == n) && (! (m % n)) && issquarefree(m/n) && (gcd(m/n, n) == 1), return(m)););}

Formula

a(p) = p, for p prime.
Showing 1-10 of 14 results. Next