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.

User: Fred Schneider

Fred Schneider's wiki page.

Fred Schneider has authored 20 sequences. Here are the ten most recent ones:

A284597 a(n) is the least number that begins a run of exactly n consecutive numbers with a nondecreasing number of divisors, or -1 if no such number exists.

Original entry on oeis.org

46, 5, 43, 1, 1613, 241, 17011, 12853, 234613, 376741, 78312721, 125938261, 4019167441, 16586155153, 35237422882, 1296230533473, 42301168491121, 61118966262061
Offset: 1

Author

Fred Schneider, Mar 29 2017

Keywords

Comments

The words "begins" and "exactly" in the definition are crucial. The initial values of tau (number of divisors function, A000005) can be partitioned into nondecreasing runs as follows: {1, 2, 2, 3}, {2, 4}, {2, 4}, {3, 4}, {2, 6}, {2, 4, 4, 5}, {2, 6}, {2, 6}, {4, 4}, {2, 8}, {3, 4, 4, 6}, {2, 8}, {2, 6}, {4, 4, 4, 9}, {2, 4, 4, 8}, {2, 8}, {2, 6, 6}, {4}, {2, 10}, ... From this we can see that a(1) = 46 (the first singleton), a(2)=5 (the first pair), a(3)=43 (the first triple), a(4)=1, etc. - Bill McEachen and Giovanni Resta, Apr 26 2017. (see also A303577 and A303578 - N. J. A. Sloane, Apr 29 2018)
Initial values computed with a brute force C++ program.
It seems very likely that one can always find a(n) and that we never need to take a(n) = -1. But this is at present only a conjecture. - N. J. A. Sloane, May 04 2017
Conjecture follows from Dickson's conjecture (see link). - Robert Israel, Mar 30 2020
If a(n) > 1, then A013632(a(n)) >= n. Might be useful to help speed up brute force search. - Chai Wah Wu, May 04 2017
The analog sequence for sigma (sum of divisors) instead of tau (number of divisors) is A285893 (see also A028965). - M. F. Hasler, May 06 2017
a(n) > 3.37*10^14 for n > 18. - Robert Gerbicz, May 14 2017

Examples

			241 = 241^1 => 2 divisors
242 = 2^1 * 11^2 => 6 divisors
243 = 3^5 => 6 divisors
244 = 2^2 * 61^1 => 6 divisors
245 = 5^1 * 7^2 => 6 divisors
246 = 2^1 * 3^1 * 41^1 => 8 divisors
247 = 13^1 * 19^1 => 4 divisors
So, 247 breaks the chain. 241 is the lowest number that is the beginning of exactly 6 consecutive numbers with a nondecreasing number of divisors. So it is the 6th term in the sequence.
Note also that a(5) is not 242, even though tau evaluated at 242, 243,..., 246 gives 5 nondecreasing values, because here we deal with full runs and 242 belongs to the run of 6 values starting at 241.
		

Programs

  • Mathematica
    Function[s, {46}~Join~Map[Function[r, Select[s, Last@ # == r &][[1, 1]]], Range[2, Max[s[[All, -1]] ] ]]]@ Map[{#[[1, 1]], Length@ # + 1} &, DeleteCases[SplitBy[#, #[[-1]] >= 0 &], k_ /; k[[1, -1]] < 0]] &@ MapIndexed[{First@ #2, #1} &, Differences@ Array[DivisorSigma[0, #] &, 10^6]] (* Michael De Vlieger, May 06 2017 *)
  • PARI
    genit()={for(n=1,20,q=0;ibgn=1;for(m=ibgn,9E99,mark1=q;q=numdiv(m);if(mark1==0,summ=0;dun=0;mark2=m);if(q>=mark1,summ+=1,dun=1);if(dun>0&&summ==n,print(n," ",mark2);break);if(dun>0&&summ!=n,q=0;m-=1)));} \\ Bill McEachen, Apr 25 2017
    
  • PARI
    A284597=vector(19);apply(scan(N,s=1,t=numdiv(s))=for(k=s+1,N,t>(t=numdiv(k))||next;k-s>#A284597||A284597[k-s]||printf(" a(%d)=%d,",k-s,s)||A284597[k-s]=s;s=k);done,[10^6]) \\ Finds a(1..10) in ~ 1 sec, but would take 100 times longer to get one more term with scan(10^8). You may extend the search using scan(END,START). - M. F. Hasler, May 06 2017
  • Python
    from sympy import divisor_count
    def A284597(n):
        count, starti, s, i = 0,1,0,1
        while True:
            d = divisor_count(i)
            if d < s:
                if count == n:
                    return starti
                starti = i
                count = 0
            s = d
            i += 1
            count += 1 # Chai Wah Wu, May 04 2017
    

Extensions

a(1), a(2), a(4) corrected by Bill McEachen and Giovanni Resta, Apr 26 2017
a(17)-a(18) from Robert Gerbicz, May 14 2017

A284596 a(n) is the minimum number that is the first of n consecutive integers with an increasing number of divisors.

Original entry on oeis.org

2, 1, 73, 61, 35521, 11371, 7392171, 168776043, 1584614377, 38045133481
Offset: 1

Author

Fred Schneider, Mar 29 2017

Keywords

Comments

Comment from Giovanni Resta, Apr 02 2017: (Start)
In A075028 the chain has to be at least of length k, whereas here it has to be of length exactly k.
Here a(2) = 1, because d(1)=1, d(2)=2, d(3)=2, so the first chain of 2 starts at 1.
(End)
Calculated with a brute force C++ program.
a(11) > 10^13. - Giovanni Resta, Apr 14 2017

Examples

			61 => 61^1 => 2 divisors
62 => 2^1 * 31^1 => 4 divisors
63 => 3^2 * 7 => 6 divisors
64 => 2^6 => 7 divisors
65 => 5^1 * 13^1 => 4 divisors.
So 61 is the first of four consecutive numbers with an increasing number of divisors. 65 breaks that chain. 61 is the minimum such number so it is the 4th number in the sequence.
		

Crossrefs

See A075028 for another version.

Extensions

Name clarified by Jon E. Schoenfield, Apr 28 2019

A258035 Smallest prime number p such that p + pssq(1), p + pssq(2), ... p + pssq(n) are all prime but p+pssq(n+1) is not, where pssq(n) is the partial sum of the square of the proper terms of the primorial (A189997(n)-1).

Original entry on oeis.org

2, 37, 3, 7, 13, 277, 2617, 43, 2924263, 300999679, 631112173, 1368737917, 4428230508349
Offset: 0

Author

Fred Schneider, May 16 2015

Keywords

Examples

			a(3) = 7 because 7 + 4, 7 + 40 and 7 + 940 are primes, but 7 + 45040 = 107 * 421 is not.
		

Crossrefs

Cf. A257466 (analog for partial primorial sum), A257467 (analog for primorial squared).

A257467 Smallest prime number p such that p + psq(1), p + psq(2), ... p + psq(n) are all prime but p+psq(n+1) is not. (psq(n) is the square of the primorial.)

Original entry on oeis.org

2, 3, 43, 7, 163, 397, 5527, 454543, 615883, 142516687, 68967673, 57502725253, 37520993053, 2630665498987, 39809897510563
Offset: 0

Author

Fred Schneider, Apr 25 2015

Keywords

Examples

			For prime 43, 43 + 4 and 43 + 36 are prime but not 43 + 30^2.
		

Crossrefs

Programs

  • PARI
    psq(n)=my(P=1); forprime(p=2, prime(n), P*=p); P^2;
    isokpsq(p, n) = {for (k=1, n, if (!isprime(p+psq(k)), return (0));); if (!isprime(p+psq(n+1)), return (1));}
    a(n) = {p = 2; while (!isokpsq(p,n), p = nextprime(p+1)); p;} \\ Michel Marcus, May 04 2015
    
  • PARI
    allprime(v,n=0)=for(i=1,#v,if(!isprime(v[i]+n), return(0))); 1
    a(n)=if(n<2,return(n+2)); my(t=4,v=vector(n-1,i,t*=prime(i+1)^2),p=2); t*=prime(n+1)^2; forprime(q=3,, if(q-p==4 && allprime(v,p) && !isprime(t+p), return(p)); p=q) \\ Charles R Greathouse IV, May 05 2015

Extensions

a(13)-a(14) from Fred Schneider, May 16 2015

A257466 Smallest prime number p such that p + pps(1), p + pps(2), ..., p + pps(n) are all prime but p + pps(n+1) is not, where pps(n) is the partial primorial sum (A060389(n)).

Original entry on oeis.org

2, 17, 11, 5, 3, 101, 19469, 38669, 191459, 191, 59, 3877889, 494272241, 360772331, 6004094833991, 41320119600341
Offset: 0

Author

Fred Schneider, Apr 25 2015

Keywords

Comments

The n-th member in the sequence m is the smallest prime with exactly n prime terms starting from m + 2.

Examples

			For prime 3: 3+2, 3+8, 3+38, 3+248 are all prime. 3+2558 = 13 * 197 is not. So a(4)= 3. (3 is the smallest prime that has exactly 4 terms.)
2 has zero terms because 2+2 is composite, so a(0)=2.
		

Crossrefs

Programs

  • PARI
    pps(n)=my(s, P=1); forprime(p=2, prime(n), s+=P*=p); s;
    isokpps(p, n) = {for (k=1, n, if (!isprime(p+pps(k)), return (0));); if (!isprime(p+pps(n+1)), return (1));}
    a(n) = {my(p = 2); while (!isokpps(p,n), p = nextprime(p+1)); p;} \\ Michel Marcus, May 02 2015

Extensions

a(15) from Fred Schneider, May 15 2015

A254791 Nontrivial solutions to n = sigma(a) = sigma(b) (A000203) and rad(a) = rad(b) (A007947) with a != b.

Original entry on oeis.org

4800, 142800, 1909440, 32948784, 210313800, 993938400, 1069286400, 1264808160, 1309463064, 2281635216, 3055104000, 3250790400
Offset: 1

Author

Fred Schneider, Feb 07 2015

Keywords

Comments

On the term "nontrivial":
If a !=b, sigma(a) = sigma(b) and rad(a) = rad(b) then sigma(a*x) = sigma(b*x) and rad(n*x) = rad(m*x) when gcd(a, b) = gcd(a,x) = gcd(b,x) = 1. So each general solution to the stated problem could generate an infinitude of constructed, "trivial" solutions. So we will limit ourselves to the more interesting "nontrivial" solutions. Precisely, if rad(a) = rad(b) = Product(p(i)), we can write a = Product(p(i)^a(i)), b = Product(p(i)^b(i)) and in this context, a(i) != b(i) for each i in order to have a nontrivial solution.
There is another type of trivial solution, if n can be expressed as the product of two or more smaller solutions, it would be considered a composite solution but still trivial.
The smallest composite solution is below:
210313800: 131576362 = 2 * 17 * 157^3 and 98731648 = 2^7 * 17^3 * 1573250790400: 2196937295 = 5 * 7^3 * 31^3 * 43 and 2156627375 = 5^3 * 7 * 31 * 43^3. Note: the common rads for the two pairs have no factors in common so we have these "trivial" composite solutions below.
sigma(131576362 * 2196937295) = sigma(98731648 * 2156627375) = sigma(131576362 * 2156627375) = sigma(98731648 * 2196937295) = 683686082027520000.

Examples

			Sigma => Pair of distinct integers 4800 => 2058 = 2 * 3 * 7^3 and 1512 = 2^3 * 3^3 * 7142800 => 52728 = 2^3 * 3 * 13^3 and 44928 = 2^7 * 3^3 * 131909440 => 1038230 = 2 * 5 * 47^3 and 752000 = 2^7 * 5^3 * 4732948784 => 10825650 = 2 * 3^9 * 5^2 * 11 and 8624880 = 2^4 * 3^4 * 5 * 11^3210313800 => 131576362 = 2 * 17 * 157^3 and 98731648 = 2^7 * 17^3 * 157993938400 => 336110688 = 2^5 * 3^3 * 73^3 and 326965248 = 2^11 * 3^7 * 73.
The pairs that contribute to the solution each have the same rad or squarefree kernel and they are "nontrivial" because within a pair for the same prime, none of the exponents match.
		

Crossrefs

Subsequence of A254035. Cf. also A255334, A255425, A255426.

A239635 Common Sigma, Uncommon Clique Numbers: a(n) is the minimal s for which there exists a set of n pairwise relatively prime integers with a sigma value of s.

Original entry on oeis.org

1, 12, 24, 72, 240, 360, 1440, 1440, 1440, 8640, 10080, 15120, 34560, 45360, 55440, 60480, 60480, 166320, 181440, 211680, 332640, 332640, 332640, 665280, 665280, 665280, 831600, 907200, 1663200, 2494800, 2661120, 2661120
Offset: 1

Author

Fred Schneider, Mar 22 2014

Keywords

Comments

The meaning of the name just involves a little wordplay.
Common Sigma: Refers to an underlying set with a common sigma.
Uncommon Clique: This set or "clique" (see link below) of numbers is "uncommon" because they are pairwise relatively prime and thus have no common factors.
Graph Theory Description:
Suppose we built an incidence graph for each positive integer s whereby each number which had sigma = s represented a vertex in the graph and the only edges were drawn between relatively prime numbers. For each s, we want to find the maximal clique (aka complete subgraph) size.
a(n) would be the minimum s where the maximal clique = n.
(Note: If a clique of size n exists for s, there exists a clique of any size < n, so any gaps in the series could be filled by S (e.g., 1440: terms 7-9).)
The first 5 terms and their solution sets (plus member factors showing they are all relatively prime to each other):
1 : 1
12 : 6 = 2 * 3, 11 = 11
24 : 14 = 2 * 7, 15 = 3 * 5, 23 = 23
72 : 46 = 2 * 23, 51 = 3 * 17, 55 = 5 * 11, 71 = 71
240 : 135 = 3^3 * 5, 158 = 2 * 79, 203 = 7 * 29, 209 = 11 * 19, 239 = 239
An exhaustive search was performed to show that these are in fact the minimal terms.
Comment with b-file submission:
I found a few useful optimizations:
1) For a sigma's possible solution set, only consider the numbers which have 3 or fewer distinct prime factors.
2) Check if there's a number which is a prime (power). Set that aside. (Call the count c1.)
3) Set aside any numbers with two prime factors (If there are duplicates, say two numbers which are multiples of two, pick the smallest exponent. The larger prime factor has less of chance of being found elsewhere in the solution set). Call this count c2.
4) Then, discard any 3-prime factor numbers which are not relatively prime with the above numbers.
5) Of those remaining numbers, determine the set of distinct primes found amongst their factors. Call this set size pc.
6) If (pc/3) + c1 + c2 > maxCliqueSize found, we have a possibility of adding to this sequence and should try to find a "sub-clique" (among the remaining 3-prime numbers) which is maxCliqueSize-c1-c2.

Crossrefs

Cf. sigma-related sequences: A000203, A007368.

A165212 The n-th term in the sequence is the minimal number that has some subset of DPS's that form an n-term arithmetic progression.

Original entry on oeis.org

1, 4, 72, 1008, 36400
Offset: 1

Author

Fred Schneider, Sep 08 2009

Keywords

Comments

Definition: m is a DPS (divisor pair sum) for n, if m = d + n/d where d | n, and d <= n/d.

Examples

			72's solution: 3+24, 4+18, 8+9. The difference between terms is 5. (Note: 72 = 3*24 = 4*18 = 8*9)
		

A167348 Let a(n) be the n-th term of the sequence. Let m = primorial(a(n)); m is the minimum positive integer such that m/phi(m) >= n.

Original entry on oeis.org

2, 2, 3, 7, 13, 23, 43, 79, 149, 257, 461, 821, 1451, 2549, 4483, 7879, 13859, 24247, 42683, 75037, 131707, 230773, 405401, 710569, 1246379, 2185021, 3831913, 6720059, 11781551, 20657677, 36221753, 63503639, 111333529, 195199289
Offset: 1

Author

Fred Schneider, Aug 13 2009

Keywords

Comments

A variant of A091440, which is the main entry for this sequence.

Examples

			primorial(7) = 210; 210/phi(210) = 210/48 >= 4;
		

Crossrefs

Cf. A091440.

Programs

  • PARI
    al(lim) = local(mm,n,m); mm=3; n=2; m=1; forprime(x=3,lim, n*=x; m*= (x-1); if (n\m >= mm, print1(x","); mm++)); /* This will generate all terms of this sequence from the 3rd onward, up to lim. The computation slows down for large values because of the size of the internal values. */

Extensions

Edited and extended by Franklin T. Adams-Watters and N. J. A. Sloane, Aug 29 2009

A167768 First of 4 or more consecutive integers with equal values of phi(phi(n)).

Original entry on oeis.org

1, 7, 31, 32, 2694, 131071, 50802031105
Offset: 1

Author

Fred Schneider, Nov 11 2009

Keywords

Comments

Next term > 1266046940 (last term of A167767 b-file). - Michel Marcus, Jun 23 2013
No other terms < 1.32*10^12. - Jud McCranie, Jul 19 2017

Examples

			p2(1) = p2(2) = p2(3) = p2(4) = 1, p2(7) = p2(8) = p2(9) = p2(10) = 2.
		

Crossrefs

Cf. A167767 (of which this list is a subset), A167766.

Programs

  • Mathematica
    a[n_] := EulerPhi[EulerPhi[n]]; Select[Range[10000], a[#] == a[# + 1] && a[# + 1] == a[# + 2] && a[# + 2] == a[# + 3] &] (* G. C. Greubel, Jun 23 2016 *)
  • PARI
    pp(n) = eulerphi(eulerphi(n))
    isA167768(n) = pp(n)==pp(n+1) && pp(n+1)==pp(n+2) && pp(n+2)==pp(n+3) \\ Michael B. Porter, Nov 24 2009

Extensions

Edited by N. J. A. Sloane, Nov 12 2009
a(7) added by Jud McCranie, Jul 17 2017