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

A328482 Number of distinct terms required when n is expressed as a greedy sum of terms of A129912 (number of nonzero digits when n is expressed in greedy A129912-base).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Oct 19 2019

Keywords

Examples

			Terms of A129912 (numbers that are products of distinct primorial numbers) begin as: 1, 2, 6, 12, 30, 60, 180, 210, 360, 420, 1260, ...
Number 5 is expressed as 5 = 2 + 2 + 1 = 2*2 + 1*1, when always choosing the largest term which is <= {what is remaining of the original number}. Thus a(5) = 2 (number of distinct terms used, 1 and 2).
Number 21 is expressed as 21 = 12 + 6 + 2 + 1, thus a(21) = 4.
		

Crossrefs

Programs

  • PARI
    isA129912(n) = { my(o=valuation(n, 2), t); if(o<1||n<2, return(n==1)); n>>=o; forprime(p=3, , t=valuation(n, p); n/=p^t; if(t>o || tA129912
    prepare_A129912_upto(n) = { my(xs=List([]), k=0); while(kA129912(k), listput(xs,k))); List(Vecrev(xs)); };
    number_of_distinct_terms_in_greedy_sum(n,terms) = { my(c=0); while(n,if(terms[1] > n, listpop(terms,1), c++; n %= terms[1])); (c); };
    A328482(n) = number_of_distinct_terms_in_greedy_sum(n,prepare_A129912_upto(n));

Formula

a(A129912(n)) = a(A002110(n)) = 1.
For all n, a(n) <= A328481(n).

A328481 Number of terms required when n is expressed as a greedy sum of terms of A129912 (digital sum of n when written in greedy A129912-base).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Oct 19 2019

Keywords

Examples

			Terms of A129912 (numbers that are products of distinct primorial numbers) begin as: 1, 2, 6, 12, 30, 60, 180, 210, 360, 420, 1260, ...
Number 5 is expressed as 5 = 2 + 2 + 1 when always choosing the largest term which is <= {what is remaining of the original number}. Thus a(5) = 3.
Number 21 is expressed as 21 = 12 + 6 + 2 + 1, thus a(21) = 4.
Number 720 is expressed as 720 = 420 + 210 + 60 + 30, thus a(720) = 4. Note that 720 = 2*360, so in this case the greedy algorithm does not produce an optimal result.
		

Crossrefs

Programs

  • PARI
    isA129912(n) = { my(o=valuation(n, 2), t); if(o<1||n<2, return(n==1)); n>>=o; forprime(p=3, , t=valuation(n, p); n/=p^t; if(t>o || tA129912
    prepare_A129912_upto(n) = { my(xs=List([]), k=0); while(kA129912(k), listput(xs,k))); List(Vecrev(xs)); };
    number_of_terms_in_greedy_sum(n,terms) = { my(c=0); while(n,if(terms[1] > n, listpop(terms,1), c += (n\terms[1]); n %= terms[1])); (c); };
    number_of_terms_in_greedy_sum_v1(n,terms) = { my(c=0); while(n,if(terms[1] > n, listpop(terms,1), n -= terms[1]; c++)); (c); }; \\ (Simpler variant)
    A328481(n) = number_of_terms_in_greedy_sum(n,prepare_A129912_upto(n));

Formula

a(0) = 0; and for n > 0, a(n) = 1 + a(A328480(n)).
a(A129912(n)) = a(A002110(n)) = 1.
For all n, a(n) >= A328482(n).

A328483 Maximum number of times any term appears when n is expressed as a greedy sum of terms of A129912 (maximal digit when n is expressed in greedy A129912-base).

Original entry on oeis.org

0, 1, 1, 1, 2, 2, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1
Offset: 0

Views

Author

Antti Karttunen, Oct 19 2019

Keywords

Comments

Apparently no term is larger than 2.
In the initial prefix of 30031 terms, the longest run of 1's is 4 and 2's occur only in runs of lengths 2, 8, 38, 68, 218 and 428. - Bill McEachen, Nov 21 2019, clarified by Antti Karttunen, Nov 23 2019

Examples

			Terms of A129912 (numbers that are products of distinct primorial numbers) begin as: 1, 2, 6, 12, 30, 60, 180, 210, 360, 420, 1260, ...
Number 5 is expressed as 5 = 2 + 2 + 1 when always choosing the largest term which is <= {what is remaining of the original number}. Thus a(5) = 2 as the most frequent term (2) occurs twice.
Number 21 is expressed as 21 = 12 + 6 + 2 + 1, thus a(21) = 1 as no term occurs more than once.
Number 720 is expressed as 720 = 420 + 210 + 60 + 30, thus a(720) = 1 as no term occurs twice. Note that 720 = 2*360, so an algorithm which would search for an optimal result would yield a different value at n=720.
		

Crossrefs

Programs

  • PARI
    isA129912(n) = { my(o=valuation(n, 2), t); if(o<1||n<2, return(n==1)); n>>=o; forprime(p=3, , t=valuation(n, p); n/=p^t; if(t>o || tA129912
    prepare_A129912_upto(n) = { my(xs=List([]), k=0); while(kA129912(k), listput(xs,k))); List(Vecrev(xs)); };
    max_factor_of_terms_in_greedy_sum(n,terms) = { my(m=0); while(n,if(terms[1] > n, listpop(terms,1), m = max(m,(n\terms[1])); n %= terms[1])); (m); };
    A328483(n) = max_factor_of_terms_in_greedy_sum(n,prepare_A129912_upto(n));

Formula

a(A129912(n)) = a(A002110(n)) = 1.

A328480 a(0) = 0; for n > 0, a(n) = n - {the largest term of A129912 <= n}.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Oct 19 2019

Keywords

Crossrefs

Programs

  • PARI
    isA129912(n) = { my(o=valuation(n, 2), t); if(o<1||n<2, return(n==1)); n>>=o; forprime(p=3, , t=valuation(n, p); n/=p^t; if(t>o || tA129912
    A328480(n) = if(!n,n, my(u=0); for(k=1, oo, if(isA129912(k), if(k==n, return(0), if(k>n, return(n-u), u = k)))));

A363457 Positions of products of distinct primorial numbers (A129912) in the sequence of products of primorial numbers (A025487).

Original entry on oeis.org

1, 2, 4, 6, 9, 13, 20, 22, 27, 29, 43, 54, 55, 66, 72, 89, 93, 112, 114, 123, 140, 147, 150, 175, 186, 223, 232, 242, 246, 274, 279, 285, 290, 332, 371, 376, 425, 433, 439, 442, 488, 500, 518, 535, 539, 570, 619, 624, 656, 718, 747, 761, 783, 789, 816, 831, 860
Offset: 1

Views

Author

Amiram Eldar, Jun 03 2023

Keywords

Comments

Numbers k such that A025487(k) is a term of A129912.
Numbers k such that A051282(k) = A363455(k).
What is the asymptotic behavior of this sequence? Empirically, it seems that a(n) ~ A * n^c, where A and c are constants.

Crossrefs

Programs

  • Mathematica
    lps = Cases[Import["https://oeis.org/A025487/b025487.txt", "Table"], {, }][[;; , 2]];
    prod = Cases[Import["https://oeis.org/A129912/b129912.txt", "Table"], {, }][[;; , 2]];
    Position[lps, #] & /@ prod // Flatten

Formula

A025487(a(n)) = A129912(n).

A172069 The number of primes adjacent to A129912(n): 0, 1 or 2.

Original entry on oeis.org

1, 1, 2, 2, 2, 2, 2, 1, 1, 2, 1, 2, 1, 1, 2, 1, 1, 0, 1, 1, 0, 0, 0, 1, 2, 0, 2, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 1, 1, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 2, 1, 0, 1, 0, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 1, 1, 0, 1, 1, 1, 0, 0, 0, 1, 1, 2, 0, 0
Offset: 1

Views

Author

Bill McEachen, Jan 24 2010

Keywords

Examples

			Both 415799 and 415801 are prime, so the entry at 415800 (n=27) is a 2 (twin primes).
Neither 27719 nor 27721 are prime, so the entry at 27720 (n=18) is a 0.
		

Crossrefs

Cf. A129912.

Extensions

Offset corrected and sequence extended by R. J. Mathar, Feb 19 2010
a(1) added by T. D. Noe, Nov 11 2013

A361376 Rewrite A129912(n), a product of distinct primorials P(i) = A002110(i) instead as a sum of powers 2^(i-1).

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 8, 7, 9, 10, 16, 11, 17, 12, 13, 18, 19, 32, 14, 33, 20, 15, 21, 34, 35, 22, 24, 64, 23, 36, 25, 65, 37, 26, 66, 38, 27, 67, 40, 128, 39, 41, 28, 68, 129, 29, 69, 42, 130, 48, 43, 30, 70, 72, 131, 49, 31, 71, 44, 73, 256, 132, 45, 50, 257, 133, 74, 51, 46, 80, 75, 258, 134, 136
Offset: 1

Views

Author

Michael De Vlieger, Jun 08 2023

Keywords

Comments

Permutation of nonnegative numbers.

Examples

			a(1) = 0 by convention.
a(8) = 8 comes before a(9) = 7, since we interpret 8 = 2^3 instead as P(4) = 210, while for a(9), 7 = 2^2 + 2^1 + 2^0 becomes P(3)*P(2)*P(1) = 30*6*2 = 360. Because 210 < 360, 8 appears before 7 in this sequence.
Table relating a(n), n=1..19 with the set S(n) of indices of distinct primorial factors of A129912(n):
   n A129912(n)  S(n)   a(n)  A272011(a(n))
  -----------------------------------------
   1         1            0
   2         2   1        1   0
   3         6   2        2   1
   4        12   2,1      3   1,0
   5        30   3        4   2
   6        60   3,1      5   2,0
   7       180   3,2      6   2,1
   8       210   4        8   3
   9       360   3,2,1    7   2,1,0
  10       420   4,1      9   3,0
  11      1260   4,2     10   3,1
  12      2310   5       16   4
  13      2520   4,2,1   11   3,1,0
  14      4620   5,1     17   4,0
  15      6300   4,3     12   3,2
  16     12600   4,3,1   13   3,2,0
  17     13860   5,2     18   4,1
  18     27720   5,2,1   19   4,1,0
  19     30030   6       32   5
  ...
		

Crossrefs

Programs

  • Mathematica
    a6939[n_] := Product[Prime[n + 1 - i]^i, {i, n}];
    g[m_] := Block[{f, j = 1},
      f[n_, i_, e_] :=
       If[n < m, Block[{p = Prime[i + 1]}, If[e == 1, Sow@ n];
         f[n p^e, i + 1, e];
         If[e > 1, f[n p^(e - 1), i + 1, e - 1]]]];
      Sort@ Reap[While[a6939[j] < m, f[2^j, 1, j]; j++]][[-1, 1]] ];
    Map[Total@
         Map[2^(# - 1) &,
          Table[LengthWhile[#1, # >= j &], {j, #2}] & @@ {#, Max[#]} ] &[
    FactorInteger[#][[All, -1]]] &, g[2^31]] (* Michael De Vlieger, Jun 08 2023, after Giovanni Resta at A129929 *)

Formula

Let S(n) be the set of indices of primorials P(i), reverse sorted, such that A129912(n) = Product_{k=1..m} S(n,k), where m = | S(n) |. Then a(n) = Sum_{k=1..m} 2^(S(n,k)-1).

A263573 Intersection of A024365 and A129912.

Original entry on oeis.org

6, 30, 60, 180, 210, 2310, 4620, 60060, 510510, 10810800, 116396280, 200560490130, 401120980260
Offset: 1

Views

Author

Bill McEachen, Oct 21 2015

Keywords

Comments

The two sequences involve areas of primitive Pythagorean triples and primorial products. Intersections are only considered once (no repeats). Conjecture: the sequence is infinite.
Conjecture: The next two entries are a(12) = 200560490130, a(13) = 401120980260.
From G. C. Greubel, Dec 29 2015: (Start)
6|a(n) for n>=1,
30|a(n) for n>=2,
a(n)/6 = {1, 5, 10, 30, 35, 385, 770, 10010, ...} is a subset of values found in A008706.
(End)
a(12) and a(13) confirmed. a(14) > 2*10^31, if it exists. - Giovanni Resta, Mar 31 2017

Examples

			A024365 begins {6, 30, 60, 84, 180, 210, 210, 330, 504, 546, 630, 840, 924, 990, 1224, 1320, 1386, 1560, 1710, 1716, 2310, ...}.
A129912 begins {1, 2, 6, 12, 30, 60, 180, 210, 360, 420, 1260, 2310, 2520, ...}.
So, common entries encountered are {6, 30, 60, 180, 210, 2310, ...}.
Specifically, we see that A024365(1) = A129912(3), A024365(2) = A129912(5), A024365(3) = A129912(6), A024365(5) = A129912(7).
These are then the first four entries of the sequence (6, 30, 60, 180).
		

Crossrefs

Programs

  • Mathematica
    s = 6 Take[Sort[(Times @@ #)/12 & /@ ({Times @@ #, (Last[#]^2 - First[#]^2)/2} & /@ Select[Subsets[Range[1, 3600, 2], {2}], GCD @@ # == 1 &])], 1800]; f[m_] := f[m] = Union[Times @@@ Subsets[FoldList[Times, 1, Prime[Range[m]]]]][[1 ;; 100]]; f[10]; f[m = 11]; While[f[m] != f[m - 1], m++]; t = f[m]; Intersection[s, t] (* Michael De Vlieger, Oct 22 2015, after Harvey P. Dale at A020885 and Jean-François Alcover at A129912 *) (* or *)
    ok[n_] := Block[{a, f = Power @@@ FactorInteger[2 n]}, SelectFirst[ Subsets[f, {1, Floor[ Length[f]/2]}], (a = Times @@ #; IntegerQ@ Sqrt[a^2 + (2 n/a)^2]) &, {}] != {}]; pr[n_] := Product[ Prime[n+1-i]^i, {i, n}];  upto[mx_] := Block[{ric, j=1}, ric[n_, ip_, ex_] := If[n < mx, Block[{p = Prime[ip + 1]}, If[ex == 1 && ok[n], Sow@ n]; ric[n p^ex, ip + 1, ex]; If[ex > 1, ric[n p^(ex - 1), ip+1, ex-1]]]]; Sort@ Reap[ While[pr[j] < mx, ric[2^j, 1, j]; j++]][[2, 1]]]; upto[10^12] (* much faster, Giovanni Resta, Mar 31 2017 *)
  • PARI
    \\note: code does not generate the sequence, just checks for a matching PPT entry
    genit(area)={myMax=floor(sqrt(2*area));i5=myMax;endless=0;soln=List();
    while(i5>=2,dun=0;j=2.*myVal/i5; k=floor(j); if(j>k, dun=1 );if(dun<1,
    c=sqrt(i5^2 + k^2);w=floor(c);if(c>w,dun=1); if(dun<1,if(gcd(k,i5)>1,dun=1 ));
    if(dun<1,listput(soln,k); listput(soln,i5);listput(soln,w);listsort(soln);
    print("soln a,b,c = ", soln[1],"  ",soln[2],"  ",soln[3] );dun=2;break ));
    i5--;endless++);if(i5<=2&&dun<1,print("no solution ") );if(i5>2&&dun<2,
    print("max iteration limit was hit ",endless) );print (endless);}
    (C++)
    #include 
    #include 
    using namespace std;
    int main(){ifstream fin1,fin2;
    int myValue,myValue2,ptr,fptr,i5,j5;
    unsigned long list1[9999]={0};
    unsigned long list2[999]={0};
    unsigned long final[31]={0};
    fin1.open("A024365.txt"); fin2.open("A129912.txt");
    ptr=1;
    while(ptr<9999)
    {fin1>> myValue;fin1.get();list1[ptr]=myValue;
        if(ptr<999)
           {fin2>> myValue2;fin2.get();list2[ptr]=myValue2;}
        ptr++;}
    fin1.close();fin2.close();fptr=1;
    for(i5=1;i5<9990;i5++)
    {for(j5=1;j5<999;j5++){
    if(list1[i5]==list2[j5] )
    {
        fptr++;
        if(fptr>30){break;}
        final[fptr]=list1[i5];
        cout << final[fptr] << ",";
        break;
    }}if(fptr>30){break;}}}

Extensions

a(12)-a(13) from Giovanni Resta, Mar 31 2017

A025487 Least integer of each prime signature A124832; also products of primorial numbers A002110.

Original entry on oeis.org

1, 2, 4, 6, 8, 12, 16, 24, 30, 32, 36, 48, 60, 64, 72, 96, 120, 128, 144, 180, 192, 210, 216, 240, 256, 288, 360, 384, 420, 432, 480, 512, 576, 720, 768, 840, 864, 900, 960, 1024, 1080, 1152, 1260, 1296, 1440, 1536, 1680, 1728, 1800, 1920, 2048, 2160, 2304, 2310
Offset: 1

Views

Author

Keywords

Comments

All numbers of the form 2^k1*3^k2*...*p_n^k_n, where k1 >= k2 >= ... >= k_n, sorted.
A111059 is a subsequence. - Reinhard Zumkeller, Jul 05 2010
Choie et al. (2007) call these "Hardy-Ramanujan integers". - Jean-François Alcover, Aug 14 2014
The exponents k1, k2, ... can be read off Abramowitz & Stegun p. 831, column labeled "pi".
For all such sequences b for which it holds that b(n) = b(A046523(n)), the sequence which gives the indices of records in b is a subsequence of this sequence. For example, A002182 which gives the indices of records for A000005, A002110 which gives them for A001221 and A000079 which gives them for A001222. - Antti Karttunen, Jan 18 2019
The prime signature corresponding to a(n) is given in row n of A124832. - M. F. Hasler, Jul 17 2019

Examples

			The first few terms are 1, 2, 2^2, 2*3, 2^3, 2^2*3, 2^4, 2^3*3, 2*3*5, ...
		

Crossrefs

Subsequence of A055932, A191743, and A324583.
Cf. A085089, A101296 (left inverses).
Equals range of values taken by A046523.
Cf. A178799 (first differences), A247451 (squarefree kernel), A146288 (number of divisors).
Rearrangements of this sequence include A036035, A059901, A063008, A077569, A085988, A086141, A087443, A108951, A181821, A181822, A322827, A329886, A329887.
Cf. also array A124832 (row n = prime signature of a(n)) and A304886, A307056.

Programs

  • Haskell
    import Data.Set (singleton, fromList, deleteFindMin, union)
    a025487 n = a025487_list !! (n-1)
    a025487_list = 1 : h [b] (singleton b) bs where
       (_ : b : bs) = a002110_list
       h cs s xs'@(x:xs)
         | m <= x    = m : h (m:cs) (s' `union` fromList (map (* m) cs)) xs'
         | otherwise = x : h (x:cs) (s  `union` fromList (map (* x) (x:cs))) xs
         where (m, s') = deleteFindMin s
    -- Reinhard Zumkeller, Apr 06 2013
    
  • Maple
    isA025487 := proc(n)
        local pset,omega ;
        pset := sort(convert(numtheory[factorset](n),list)) ;
        omega := nops(pset) ;
        if op(-1,pset) <> ithprime(omega) then
            return false;
        end if;
        for i from 1 to omega-1 do
            if padic[ordp](n,ithprime(i)) < padic[ordp](n,ithprime(i+1)) then
                return false;
            end if;
        end do:
        true ;
    end proc:
    A025487 := proc(n)
        option remember ;
        local a;
        if n = 1 then
            1 ;
        else
            for a from procname(n-1)+1 do
                if isA025487(a) then
                    return a;
                end if;
            end do:
        end if;
    end proc:
    seq(A025487(n),n=1..100) ; # R. J. Mathar, May 25 2017
  • Mathematica
    PrimeExponents[n_] := Last /@ FactorInteger[n]; lpe = {}; ln = {1}; Do[pe = Sort@PrimeExponents@n; If[ FreeQ[lpe, pe], AppendTo[lpe, pe]; AppendTo[ln, n]], {n, 2, 2350}]; ln (* Robert G. Wilson v, Aug 14 2004 *)
    (* Second program: generate all terms m <= A002110(n): *)
    f[n_] := {{1}}~Join~
      Block[{lim = Product[Prime@ i, {i, n}],
       ww = NestList[Append[#, 1] &, {1}, n - 1], dec},
       dec[x_] := Apply[Times, MapIndexed[Prime[First@ #2]^#1 &, x]];
       Map[Block[{w = #, k = 1},
          Sort@ Prepend[If[Length@ # == 0, #, #[[1]]],
            Product[Prime@ i, {i, Length@ w}] ] &@ Reap[
             Do[
              If[# < lim,
                 Sow[#]; k = 1,
                 If[k >= Length@ w, Break[], k++]] &@ dec@ Set[w,
                 If[k == 1,
                   MapAt[# + 1 &, w, k],
                   PadLeft[#, Length@ w, First@ #] &@
                     Drop[MapAt[# + Boole[i > 1] &, w, k], k - 1] ]],
               {i, Infinity}] ][[-1]]
    ] &, ww]]; Sort[Join @@ f@ 13] (* Michael De Vlieger, May 19 2018 *)
  • PARI
    isA025487(n)=my(k=valuation(n,2),t);n>>=k;forprime(p=3,default(primelimit),t=valuation(n,p);if(t>k,return(0),k=t);if(k,n/=p^k,return(n==1))) \\ Charles R Greathouse IV, Jun 10 2011
    
  • PARI
    factfollow(n)={local(fm, np, n2);
      fm=factor(n); np=matsize(fm)[1];
      if(np==0,return([2]));
      n2=n*nextprime(fm[np,1]+1);
      if(np==1||fm[np,2]Franklin T. Adams-Watters, Dec 01 2011 */
    
  • PARI
    is(n) = {if(n==1, return(1)); my(f = factor(n));  f[#f~, 1] == prime(#f~) && vecsort(f[, 2],,4) == f[, 2]} \\ David A. Corneth, Feb 14 2019
    
  • PARI
    upto(Nmax)=vecsort(concat(vector(logint(Nmax,2),n,select(t->t<=Nmax,if(n>1,[factorback(primes(#p),Vecrev(p)) || p<-partitions(n)],[1,2]))))) \\ M. F. Hasler, Jul 17 2019
    
  • PARI
    \\ For fast generation of large number of terms, use this program:
    A283980(n) = {my(f=factor(n)); prod(i=1, #f~, my(p=f[i, 1], e=f[i, 2]); if(p==2, 6, nextprime(p+1))^e)}; \\ From A283980
    A025487list(e) = { my(lista = List([1, 2]), i=2, u = 2^e, t); while(lista[i] != u, if(2*lista[i] <= u, listput(lista,2*lista[i]); t = A283980(lista[i]); if(t <= u, listput(lista,t))); i++); vecsort(Vec(lista)); }; \\ Returns a list of terms up to the term 2^e.
    v025487 = A025487list(101);
    A025487(n) = v025487[n];
    for(n=1,#v025487,print1(A025487(n), ", ")); \\ Antti Karttunen, Dec 24 2019
    
  • Sage
    def sharp_primorial(n): return sloane.A002110(prime_pi(n))
    N = 2310
    nmax = 2^floor(log(N,2))
    sorted([j for j in (prod(sharp_primorial(t[0])^t[1] for k, t in enumerate(factor(n))) for n in (1..nmax)) if j <= N])
    # Giuseppe Coppoletta, Jan 26 2015

Formula

What can be said about the asymptotic behavior of this sequence? - Franklin T. Adams-Watters, Jan 06 2010
Hardy & Ramanujan prove that there are exp((2 Pi + o(1))/sqrt(3) * sqrt(log x/log log x)) members of this sequence up to x. - Charles R Greathouse IV, Dec 05 2012
From Antti Karttunen, Jan 18 & Dec 24 2019: (Start)
A085089(a(n)) = n.
A101296(a(n)) = n [which is the first occurrence of n in A101296, and thus also a record.]
A001221(a(n)) = A061395(a(n)) = A061394(n).
A007814(a(n)) = A051903(a(n)) = A051282(n).
a(A101296(n)) = A046523(n).
a(A306802(n)) = A002182(n).
a(n) = A108951(A181815(n)) = A329900(A181817(n)).
If A181815(n) is odd, a(n) = A283980(a(A329904(n))), otherwise a(n) = 2*a(A329904(n)).
(End)
Sum_{n>=1} 1/a(n) = Product_{n>=1} 1/(1 - 1/A002110(n)) = A161360. - Amiram Eldar, Oct 20 2020

Extensions

Offset corrected by Matthew Vandermast, Oct 19 2008
Minor correction by Charles R Greathouse IV, Sep 03 2010

A071562 Numbers n such that the sum of the middle divisors of n (A071090) is not zero.

Original entry on oeis.org

1, 2, 4, 6, 8, 9, 12, 15, 16, 18, 20, 24, 25, 28, 30, 32, 35, 36, 40, 42, 45, 48, 49, 50, 54, 56, 60, 63, 64, 66, 70, 72, 77, 80, 81, 84, 88, 90, 91, 96, 98, 99, 100, 104, 108, 110, 112, 117, 120, 121, 126, 128, 130, 132, 135, 140, 143, 144, 150, 153, 154, 156, 160
Offset: 1

Views

Author

Robert G. Wilson v, May 30 2002

Keywords

Comments

Numbers n such that A067742(n) is nonzero.
Numbers of the form m*k with m <= k <= 2m. - Vladeta Jovovic, May 07 2005
Numbers occurring in A100345 (except 0). - Franklin T. Adams-Watters, Apr 04 2010
This sequence is closed under multiplication. If n = a*b with a <= b <= 2a, and m = c*d with c <= d <= 2c, then min(a*d,b*c)*max(a*d,b*c) is a factorization of m*n with the specified property. - Franklin T. Adams-Watters, Apr 07 2010
Also numbers n with the property that the number of parts in the symmetric representation of sigma(n) is odd. - Michel Marcus and Omar E. Pol, Apr 25 2014. (For a proof see the link in A071561.) - Hartmut F. W. Hoft, Sep 09 2015
Among these numbers, those with sigma(n) also odd are 1, 2, 4, 8, 9, 16, ..., that is, probably A028982 (squares and twice squares). - Michel Marcus, Jun 21 2014
Records in A244367. - Omar E. Pol, Jul 27 2014
Starting from a(5), the sequence is a subset of a sequence formed out of the prime factorization of A129912(m), m >= 5; see associated PARI code in Prog section. - Bill McEachen, Jan 25 2018
For numbers n = 2^m * q, m >= 0, q odd, and where r(n) = floor( (sqrt(8n+1) - 1)/2 ), the symmetric representation of sigma(n) has an odd number of parts precisely when there exists an odd divisor d of n satisfying d <= r(n) and d*2^(m+1) > r(n); see the link for a proof and see the associated Mathematica code. - Hartmut F. W. Hoft, Feb 12 2018
All hexagonal numbers A000384 > 0 are in the sequence. - Omar E. Pol, Aug 28 2018

Examples

			From _Hartmut F. W. Hoft_, Feb 12 2018: (Start)
63 = 3^2*7 is in the sequence since 7*2^1 > r(63) = 10.
80 = 2^4*5 is in the sequence since 1*2^5 > r(80) = 12. (End)
		

Crossrefs

Cf. A067742.
The complement is A071561.

Programs

  • Mathematica
    f[n_] := Plus @@ Select[ Divisors[n], Sqrt[n/2] <= # < Sqrt[n*2] &]; Select[ Range[175], f[ # ] != 0 &]
    (* Related to the symmetric representation of sigma *)
    (* subsequence of odd parts of number k for m <= k <= n *)
    (* Function a237270[] is defined in A237270 *)
    (* Using Wilson's Mathematica program (see above) I verified the equality of both for numbers k <= 10000 *)
    a071562[m_,n_]:=Select[Range[m,n],OddQ[Length[a237270[#]]]&]
    a071562[1,160] (* data *)
    (* Hartmut F. W. Hoft, Jun 23 2014 *)
    (* implementation using the odd divisor property *)
    evenExp[n_] := First[NestWhile[{#[[1]]+1, #[[2]]/2}&, {0, n}, EvenQ[Last[#]]&]]
    oddSRQ[n_] := Module[{e=2^evenExp[n], Floor[(Sqrt[8n+1]-1)/2]}, Select[Divisors[n/e], #<=r&&2 e #>r&]!={}]
    a071562D[m_, n_] := Select[Range[m, n], oddSRQ]
    a071562D[1, 160] (* data *) (* Hartmut F. W. Hoft, Feb 12 2018 *)
  • PARI
    is(n)=fordiv(n,d, if(d^2>=n/2 && d^2<2*n, return(1))); 0 \\ Charles R Greathouse IV, Aug 01 2016
    
  • PARI
    is(n,f=factor(n))=my(t=(n+1)\2); fordiv(f,d, if(d^2>=t, return(d^2<2*n))); 0 \\ Charles R Greathouse IV, Jan 22 2018
    
  • PARI
    list(lim)=my(v=List(),t); forfactored(n=1,lim\1, t=(n[1]+1)\2; fordiv(n[2],d, if(d^2>=t, if(d^2<2*n[1], listput(v,n[1])); break))); Vec(v) \\ Charles R Greathouse IV, Jan 22 2018
    
  • PARI
    /* functional code associated to the A129912 comment above */ for(j5=5, length(A129912), a=Mat(); a=factor(A129912[j5]); sum2=0; for(i5=1, length(a[,2]), sum2=sum2+a[i5,2]); listput(final,length(a[,1])*sum2)); v=Set(final); \\ Bill McEachen, Jan 25 2018
Showing 1-10 of 26 results. Next