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

A286603 Restricted growth sequence computed for sigma, A000203.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 6, 11, 12, 13, 13, 14, 10, 15, 16, 17, 18, 19, 13, 20, 14, 17, 21, 22, 23, 24, 18, 25, 26, 27, 26, 28, 29, 20, 22, 30, 17, 31, 32, 33, 34, 24, 26, 35, 36, 37, 24, 38, 27, 39, 24, 39, 40, 30, 20, 41, 42, 31, 43, 44, 33, 45, 46, 47, 31, 45, 24, 48, 49, 50, 35, 51, 31, 41, 40, 52, 53, 47, 33, 54, 55, 56, 39, 57, 30, 58, 59, 41, 60
Offset: 1

Views

Author

Antti Karttunen, May 11 2017

Keywords

Comments

When filtering sequences (by equivalence class partitioning), this sequence can be used instead of A000203, because for all i, j it holds that: a(i) = a(j) <=> A000203(i) = A000203(j) <=> A286358(i) = A286358(j).
Note that the latter equivalence indicates that this is also the restricted growth sequence of A286358.

Examples

			Construction: we start with a(1)=1 for sigma(1)=1 (where sigma = A000203), and then after, for all n > 1, whenever the value of sigma(n) has not been encountered before, we set a(n) to the least natural number k not already in sequence among a(1) .. a(n-1), otherwise [whenever sigma(n) = sigma(m), for some m < n], we set a(n) = a(m), i.e., to the same value that was assigned to a(m).
For n=2, sigma(2) = 3, not encountered before, thus we allot for a(2) the least so far unused number, which is 2, thus a(2) = 2.
For n=3, sigma(3) = 4, not encountered before, thus we allot for a(3) the least so far unused number, which is 3, thus a(3) = 3.
For n=4, sigma(4) = 7, not encountered before, thus we allot for a(4) the least so far unused number, which is 4, thus a(4) = 4.
For n=5, sigma(5) = 6, not encountered before, thus we allot for a(5) the least so far unused number, which is 5, thus a(5) = 5.
For n=6, sigma(6) = 12, not encountered before, thus we allot for a(6) the least so far unused number, which is 6, thus a(6) = 6.
And this continues for n=7..10 because also for those n sigma obtains fresh new values, so here a(n) = n up to n = 10.
But then comes n=11, where sigma(11) = 12, a value which was already encountered at n=6 for the first time, thus we set a(11) = a(6) = 6.
		

Crossrefs

Programs

  • Mathematica
    With[{nn = 93}, Function[s, Table[Position[Keys@ s, k_ /; MemberQ[k, n]][[1, 1]], {n, nn}]]@ Map[#1 -> #2 & @@ # &, Transpose@ {Values@ #, Keys@ #}] &@ PositionIndex@ Array[DivisorSigma[1, #] &, nn]] (* Michael De Vlieger, May 12 2017, Version 10 *)
  • PARI
    A000203(n) = sigma(n);
    rgs_transform(invec) = { my(occurrences = Map(), outvec = vector(length(invec)), u=1); for(i=1, length(invec), if(mapisdefined(occurrences,invec[i]), my(pp = mapget(occurrences, invec[i])); outvec[i] = outvec[pp] , mapput(occurrences,invec[i],i); outvec[i] = u; u++ )); outvec; };
    write_to_bfile(start_offset,vec,bfilename) = { for(n=1, length(vec), write(bfilename, (n+start_offset)-1, " ", vec[n])); }
    write_to_bfile(1,rgs_transform(vector(10000,n,A000203(n))),"b286603.txt");

A206036 Numbers m such that sigma(m) = sigma(k) has solution for distinct numbers m and k.

Original entry on oeis.org

6, 10, 11, 14, 15, 16, 17, 20, 21, 23, 24, 25, 26, 28, 30, 31, 33, 34, 35, 38, 39, 40, 41, 42, 44, 46, 47, 48, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 62, 63, 65, 66, 68, 69, 70, 71, 74, 75, 76, 77, 78, 79, 80, 82, 83, 84, 85, 86, 87, 88, 89, 90, 92, 93, 94
Offset: 1

Views

Author

Jaroslav Krizek, Feb 03 2012

Keywords

Examples

			6 and 11 are in the sequence because sigma(6) = sigma(11) = 12.
7 is not on the list because sigma(7) = 8 and there is no other integer for which sigma(n) = 8.
		

Crossrefs

Complement of A211656.

Programs

  • Mathematica
    max = 9000; sigmaList = Table[DivisorSigma[1, n], {n, Prime[PrimePi[max]]}]; Select[Range[Floor[Sqrt[max]]], Count[sigmaList, sigmaList[[#]]] > 1 &] (* Alonso del Arte, Feb 06 2012 *)
  • PARI
    is(k) = invsigmaNum(sigma(k)) > 1; \\ Amiram Eldar, Dec 15 2024, using Max Alekseyev's invphi.gp

A241625 Smallest number m such that the GCD of the x's that satisfy sigma(x)=m is n.

Original entry on oeis.org

1, 3, 4, 7, 6, 6187272, 8, 15, 13, 196602, 8105688, 28, 14
Offset: 1

Views

Author

Michel Marcus, Apr 26 2014

Keywords

Comments

This sequence is a sequel to A240667.
Some large known terms: a(16)=2031554, a(25)=1355816, a(31)=8880128, a(80)=11532, a(97)=5488.
a(14) > 10^9. - Michel Marcus, May 09 2014
a(n) is a multiple of A353783(n). Some further terms: a(15) = 497943732, a(17) = 962949708, a(20) = 612372264, a(48) = 12692888, a(53) = 39887316. - Max Alekseyev, Jan 19 2025

Examples

			a(2) = 3, because the only x such that sigma(x)=3 is 2.
a(6) = 6187272, because the x's that satisfy sigma(x)=6187272 are [2651676, 2855646] and their GCD is 6.
		

Crossrefs

Programs

  • PARI
    lista() = {lim = 12000000; nn = 100; out = "a241625.txt"; v = vector(lim, i, sigma(i)); w = vector(lim); for (i=1, lim, vi = v[i]; if (vi <= lim, if (w[vi] == 0, w[vi] = i, w[vi] = concat(w[vi], i)););); for (i=1, nn, got = 0; write1(out, i, " "); for (j=1, #w, wj = w[j]; if (gcd(wj) == i, got = 1; write(out, j);break;);); if (! got, write(out, );););}
    
  • PARI
    a(n) = my(m=1); while(gcd(invsigma(m)) != n, m++); m; \\ Michel Marcus, Jan 16 2025; using Max Alekseyev's invphi.gp

Formula

For n in A211656, a(n) = sigma(n).

A211660 Numbers k such that k and k+2 both have unique values of sigma(k) and sigma(k+2); sigma(k) = A000203(k) = sum of divisors of k.

Original entry on oeis.org

1, 2, 3, 5, 7, 27, 43, 98, 146, 169, 171, 197, 200, 217, 241, 257, 281, 331, 347, 379, 386, 409, 448, 461, 487, 505, 507, 509, 547, 554, 576, 577, 641, 800, 821, 829, 841, 857, 907, 937, 1117, 1250, 1261, 1283, 1289, 1322, 1352, 1359, 1387, 1415, 1601, 1621
Offset: 1

Views

Author

Jaroslav Krizek, Apr 20 2012

Keywords

Comments

Subsequence of A211656. Number k is in sequence iff k and k+2 are in A211656.
Supersequence of A211767 (lesser of twin primes p, p+2 with unique values of sigma(p) and sigma(p+2)).

Examples

			Number 27 is in sequence because sigma(27) = 40, sigma(29) = 30 and there are no other numbers m, n with sigma(m) = 40 or sigma(n) = 30.
		

Crossrefs

A240667 a(n) is the GCD of the solutions x of sigma(x) = n; sigma(n) = A000203(n) = sum of divisors of n.

Original entry on oeis.org

1, 0, 2, 3, 0, 5, 4, 7, 0, 0, 0, 1, 9, 13, 8, 0, 0, 1, 0, 19, 0, 0, 0, 1, 0, 0, 0, 12, 0, 29, 1, 1, 0, 0, 0, 22, 0, 37, 18, 27, 0, 1, 0, 43, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 49, 0, 0, 1, 0, 61, 32, 0, 0, 0, 0, 67, 0, 0, 0, 1, 0, 73, 0, 0, 0, 45, 0, 1, 0, 0
Offset: 1

Views

Author

Michel Marcus, Apr 10 2014

Keywords

Comments

From n = 1 to 5, the least integers such that a(x) = n, depending on if singletons (see A007370 and A211656) are accepted or not, are 1, 3, 4, 7, 6 or 12, 126, 124, 210, 22152.
Is it possible to find an integer n such that a(n) = 6? Answer: n = A241625(6) = 6187272.

Examples

			There are no integers such that sigma(x) = 2, so a(2) = 0.
There is a single integer, x = 2, such that sigma(x) = 3, so a(3) = 2.
There are 2 integers, x = 6 and 11, such that sigma(x)=12, their gcd is 1, so a(12) = 1.
		

Crossrefs

Programs

  • Maple
    A240667 := n -> igcd(op(select(k->sigma(k)=n, [$1..n]))):
    seq(A240667(n), n=1..82); # Peter Luschny, Apr 13 2014
  • Mathematica
    a[n_] := GCD @@ Select[Range[n], DivisorSigma[1, #] == n&];
    Array[a, 100] (* Jean-François Alcover, Jul 30 2018 *)
  • PARI
    sigv(n) =  select(i->sigma(i) == n, vector(n, i, i));
    a(n) = {v = sigv(n); if (#v == 0, 0, gcd(v));}
    
  • PARI
    a(n) = my(s = invsigma(n)); if(#s, gcd(s), 0); \\ Amiram Eldar, Dec 19 2024, using Max Alekseyev's invphi.gp

Formula

a(A007369(n)) = 0.

A211657 Sigma(k) of numbers k such that value of sigma(k) is unique; sigma(k) = A000203(k) = sum of divisors of k.

Original entry on oeis.org

1, 3, 4, 7, 6, 8, 15, 13, 28, 14, 39, 20, 36, 40, 30, 63, 91, 38, 44, 78, 57, 93, 62, 127, 68, 195, 74, 121, 112, 171, 217, 102, 162, 110, 133, 255, 176, 160, 204, 138, 222, 266, 150, 300, 158, 363, 164, 183, 260, 174, 508, 194, 198, 200, 465, 306, 212, 256, 330
Offset: 1

Views

Author

Jaroslav Krizek, Apr 20 2012

Keywords

Examples

			For n = 4, a(n) = 7 because A211656(4) = 4; sigma (4) = 7.
		

Crossrefs

Cf. A007370 (sorted version of this sequence).

Formula

a(n) = sigma(A211656(n)).

A211658 Nonprime numbers k such that value of sigma(k) is unique; sigma(k) = A000203(k) = sum of divisors of k.

Original entry on oeis.org

1, 4, 8, 9, 12, 18, 22, 27, 32, 36, 45, 49, 50, 64, 72, 81, 91, 98, 100, 106, 121, 128, 129, 133, 134, 146, 148, 152, 162, 169, 171, 192, 200, 202, 217, 218, 219, 243, 256, 259, 262, 268, 274, 288, 289, 292, 301, 314, 324, 333, 338, 343, 361, 381, 386, 388
Offset: 1

Views

Author

Jaroslav Krizek, Apr 20 2012

Keywords

Comments

Complement of A066076 with respect to A211656.

Examples

			Number 36 is in the sequence because sigma(36) = 91 and there is no other number m with sigma(m) = 91.
Number 6 is not in the sequence because sigma(6) = 12 and 12 is also sigma(11).
		

Crossrefs

A211659 Numbers k such that k and k+1 both have unique values of sigma(k) and sigma(k+1); sigma(k) = A000203(k) = sum of divisors of k.

Original entry on oeis.org

1, 2, 3, 4, 7, 8, 12, 18, 36, 49, 72, 100, 128, 133, 148, 162, 192, 199, 217, 218, 256, 288, 313, 337, 400, 421, 457, 511, 547, 548, 562, 576, 577, 578, 652, 661, 676, 721, 841, 842, 871, 876, 1058, 1093, 1152, 1171, 1191, 1200, 1227, 1233, 1249, 1282, 1306
Offset: 1

Views

Author

Jaroslav Krizek, Apr 20 2012

Keywords

Comments

Subsequence of A211656. Number k is in sequence iff k and k+1 are in A211656.

Examples

			Number 36 is in sequence because sigma(36) = 91, sigma(37) = 38 and there are no other numbers m, n with sigma(m) = 91 or sigma(n) = 38.
		

Crossrefs

A211767 Lesser of twin primes p, p+2 with unique values of sigma(p) and sigma(p+2); sigma(n) = A000203(n) = sum of divisors of n.

Original entry on oeis.org

3, 5, 197, 281, 347, 461, 641, 821, 857, 1289, 1697, 1721, 1787, 1877, 2081, 2141, 2381, 2549, 2801, 3257, 3539, 3557, 3929, 4019, 4241, 4637, 4721, 5441, 5477, 5501, 5657, 6449, 6689, 6701, 6761, 6827, 6947, 7457, 7589, 7877, 8009, 8387, 8537, 8597, 8627
Offset: 1

Views

Author

Jaroslav Krizek, Apr 20 2012

Keywords

Comments

Subsequence of A211656, A211660, A211678.

Examples

			Prime 197 is in sequence because 197 and 199 are twin primes, sigma(197) = 198, sigma(199) = 200 and there are no other numbers m, n with sigma(m) = 198 or sigma(n) = 200.
		

Crossrefs

Cf. A211678 (twin primes p, p+2 with unique values of sigma(p) and sigma(p+2)), A211769 (greater of twin primes p, p+2 with unique values of sigma(p) and sigma(p+2)).

Programs

  • Mathematica
    d = DivisorSigma[1, Range[10000]]; t = Transpose[Select[Tally[Sort[d]], #[[2]] == 1 && #[[1]] <= Length[d] &]][[1]]; t2 = Sort[Flatten[Table[Position[d, i], {i, t}]]]; t3 = Select[t2, PrimeQ]; tp = {}; Do[If[t3[[i+1]] - t3[[i]] == 2, AppendTo[tp, t3[[i]]]], {i, Length[t3] - 1}]; tp (* T. D. Noe, Apr 26 2012 *)

Extensions

A-number corrected by Jaroslav Krizek, Mar 17 2013

A211769 Greater of twin primes p, p+2 with unique values of sigma(p) and sigma(p+2); sigma(n) = A000203(n) = sum of divisors of n.

Original entry on oeis.org

5, 7, 199, 283, 349, 463, 643, 823, 859, 1291, 1699, 1723, 1789, 1879, 2083, 2143, 2383, 2551, 2803, 3259, 3541, 3559, 3931, 4021, 4243, 4639, 4723, 5443, 5479, 5503, 5659, 6451, 6691, 6703, 6763, 6829, 6949, 7459, 7591, 7879, 8011, 8389, 8539, 8599, 8629
Offset: 1

Views

Author

Jaroslav Krizek, Apr 20 2012

Keywords

Comments

Subsequence of A211656, A211660, and A211678.

Examples

			Prime 199 is in sequence because 197 and 199 are twin primes, sigma(197) = 198, sigma(199) = 200 and there are no other numbers m, n with sigma(m) = 198 or sigma(n) = 200.
		

Crossrefs

Cf. A211678 (twin primes p, p+2 with unique values of sigma(p) and sigma(p+2)), A211767 (lesser of twin primes p, p+2 with unique values of sigma(p) and sigma(p+2)).

Programs

  • Mathematica
    d = DivisorSigma[1, Range[10000]]; t = Transpose[Select[Tally[Sort[d]], #[[2]] == 1 && #[[1]] <= Length[d] &]][[1]]; t2 = Sort[Flatten[Table[Position[d, i], {i, t}]]]; t3 = Select[t2, PrimeQ]; tp = {}; Do[If[t3[[i + 1]] - t3[[i]] == 2, AppendTo[tp, t3[[i + 1]]]], {i, Length[t3] - 1}]; tp (* T. D. Noe, Apr 26 2012 *)

Extensions

A-number corrected by Jaroslav Krizek, Mar 17 2013
Showing 1-10 of 17 results. Next