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

A073258 Numbers n such that gcd(c(n),n) = gcd(A002808(n),n) = A064814(n)=1 where c(n) is the n-th composite number.

Original entry on oeis.org

1, 3, 4, 8, 9, 11, 13, 17, 19, 23, 25, 27, 29, 31, 33, 35, 37, 38, 39, 40, 41, 43, 44, 45, 46, 47, 49, 53, 57, 58, 59, 61, 66, 67, 68, 69, 71, 73, 79, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 94, 95, 97, 100, 101, 103, 106, 107, 108, 109, 111, 113, 115, 116, 117, 118, 119
Offset: 1

Views

Author

Labos Elemer, Jul 22 2002

Keywords

Examples

			n=256: composite(256) = 323 = 17*19, gcd(323,256)=1, so 256 is a term.
		

Crossrefs

Programs

  • Mathematica
    c[x_] := FixedPoint[x+PrimePi[ # ]+1&, x]; t=Table[0, {256}]; s=0; k=0; Do[s=GCD[c[n], n]; If[Equal[s, 1], k=k+1; t[[k]]=n; Print[{k, n}]], {n, 1, 256}] t
  • PARI
    lista(nn) = {my(n=0, list=List()); forcomposite (c=1, nn, n++; if (gcd(n, c) == 1, listput(list, c))); Vec(list); } \\ Michel Marcus, Jul 19 2020

A073257 Smallest k such that gcd(c(k),k) = gcd(A002808(k),k) = A064814(k) = n.

Original entry on oeis.org

1, 2, 12, 20, 5, 6, 7, 64, 234, 50, 55, 24, 26, 28, 30, 32, 629, 1008, 209, 220, 231, 1012, 506, 168, 425, 182, 189, 2716, 2204, 1080, 93, 96, 99, 2176, 105, 4428, 1369, 5586, 1755, 1800, 6109, 2478, 2279, 3916, 5760, 644, 4606, 1920, 1960, 10250, 2040, 2444
Offset: 1

Views

Author

Labos Elemer, Jul 22 2002

Keywords

Examples

			50th composite is 70, gcd(50,70)=10 appears first here, a(10)=50.
		

Crossrefs

Programs

  • Mathematica
    f[x_] := FixedPoint[x+PrimePi[ # ]+1&, x] t=Table[0, {100}]; Do[s=GCD[f[n], n]; If[s<101&&t[[s]]==0, t[[s]]=n], {n, 1, 100000}]; t

Formula

a(n) = min{x: gcd(c(x), x)=n}, where c(x) is the x-th composite number.

A073259 Number of iterations of f(n,k) = n+pi(k)+1 starting from f(n,n) until a fixed point is reached.

Original entry on oeis.org

4, 4, 4, 3, 3, 4, 4, 3, 3, 4, 4, 4, 3, 4, 4, 3, 3, 3, 4, 4, 4, 3, 3, 3, 4, 4, 3, 4, 5, 4, 3, 4, 4, 4, 3, 3, 4, 4, 4, 3, 3, 4, 5, 4, 4, 3, 3, 4, 4, 4, 4, 5, 4, 4, 4, 3, 4, 4, 4, 5, 4, 4, 4, 3, 4, 4, 4, 4, 3, 3, 3, 4, 4, 4, 4, 5, 4, 4, 5, 5, 4, 4, 5, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 5, 4, 4, 4, 3, 4, 5
Offset: 1

Views

Author

Labos Elemer, Jul 22 2002

Keywords

Comments

Original name: Length of FixedPointList leading to value of n-th composite number.

Examples

			n=1000000:the list={1000000,1078499,1084157,1084577,1084604,1084605}, its length including initial term is 6, while composite[1000000]=1084605.
		

Crossrefs

Programs

  • Mathematica
    Table[Length[FixedPointList[w+PrimePi[ # ]+1&, w]]-1, {w, 1, 128}]

Formula

See program below.

Extensions

Name clarified by Sean A. Irvine, Nov 21 2024

A337490 a(0)=1; for n > 0, a(n) = the greatest common divisor (GCD) of n and the sum of all previous terms if the GCD is not already in the sequence; otherwise a(n) = a(n-1) + n.

Original entry on oeis.org

1, 2, 4, 7, 11, 5, 6, 13, 21, 30, 10, 21, 33, 46, 14, 29, 45, 62, 18, 37, 57, 78, 22, 45, 69, 94, 26, 53, 81, 110, 140, 171, 203, 236, 270, 305, 341, 378, 416, 39, 79, 120, 162, 205, 249, 294, 340, 387, 3, 52, 102, 17, 69, 122, 176, 231, 287, 344, 402, 461, 521, 582, 644, 707, 771, 836, 902, 969
Offset: 0

Views

Author

Scott R. Shannon, Aug 29 2020

Keywords

Comments

The sequence displays the unusual behavior of decreasing 53 times in the first 1975 terms, due to the existence of a GCD which has not previously appeared in the sequence, but then not decreasing again for n up to at least 100 million. In this period there are 37 repeated terms, the first being 21 at n=11 and the last 161202 at n=2054. In the same range many values do not appear, for example 16,23,28,32,36. It is unknown when the sequence decreases again, or if all values eventually appear. The 100 millionth term is 4999999948050717.
See the companion sequence A333980 for the sum of the terms from a(0) to a(n).

Examples

			a(2) = 4 as the sum of all previous terms is a(0)+a(1) = 3, and the GCD of 3 and 2 is 1, which has already appeared in the sequence. Therefore a(2) = a(1) + n = 2 + 2 = 4.
a(4) = 11 as the sum of all previous terms is a(0)+...+a(3) = 14, and the GCD of 14 and 4 is 2. However 2 has already appeared so a(4) = a(3) + n = 7 + 4 = 11.
a(5) = 5 as the sum of all previous terms is a(0)+...+a(4) = 25, and the GCD of 25 and 5 is 5, and as 5 has not previous appeared a(5) = 5.
		

Crossrefs

Cf. A333980, A333826 (same rules but starting a(1)=1), A165430, A064814, A082299, A005132, A336957.

Programs

  • PARI
    lista(nn) = {my(va = vector(nn), s=0); va[1] = 1; s += va[1]; for (n=2, nn, my(g = gcd(n-1, s)); if (#select(x->(x==g), va), va[n] = va[n-1]+n-1, va[n] = g); s += va[n];); va;} \\ Michel Marcus, Sep 05 2020

A333980 Partial sums of A337490.

Original entry on oeis.org

1, 3, 7, 14, 25, 30, 36, 49, 70, 100, 110, 131, 164, 210, 224, 253, 298, 360, 378, 415, 472, 550, 572, 617, 686, 780, 806, 859, 940, 1050, 1190, 1361, 1564, 1800, 2070, 2375, 2716, 3094, 3510, 3549, 3628, 3748, 3910, 4115, 4364, 4658, 4998, 5385, 5388, 5440, 5542, 5559, 5628, 5750
Offset: 0

Views

Author

Scott R. Shannon, Sep 04 2020

Keywords

Comments

See A337490 for an explanation of the sequence.

Crossrefs

A071224 LCM of n and n-th composite number.

Original entry on oeis.org

4, 6, 24, 36, 10, 12, 14, 120, 144, 90, 220, 84, 286, 168, 75, 208, 459, 252, 570, 160, 231, 374, 805, 72, 950, 78, 1080, 84, 1276, 90, 1426, 96, 1617, 850, 1785, 468, 1998, 2090, 2184, 2280, 2378, 420, 2666, 2772, 2880, 2990, 3102, 816, 3381
Offset: 1

Views

Author

Amarnath Murthy, May 17 2002

Keywords

Examples

			a(10)=90 as 18 is the 10th composite number and 10*18/gcd(10,18)=10*18/2=90.
		

Programs

  • Mathematica
    Module[{nn=100,cmps},cmps=Select[Range[nn],CompositeQ];LCM@@@Thread[ {Range[ Length[ cmps]],cmps}]] (* Harvey P. Dale, Jul 21 2024 *)

Formula

a(n) = n*A002808(n)/A064814(n). - Lior Manor, Jun 02 2002

Extensions

More terms from Reinhard Zumkeller, May 28 2002
More terms from Lior Manor, Jun 02 2002

A333826 a(1)=1; for n>1, a(n) = the greatest common divisor (GCD) of n and the sum of all previous terms if the GCD is not already in the sequence; otherwise a(n) = a(n-1) + n.

Original entry on oeis.org

1, 3, 6, 2, 7, 13, 20, 4, 13, 23, 34, 46, 59, 73, 88, 8, 25, 43, 62, 10, 31, 53, 76, 100, 125, 151, 178, 206, 235, 15, 46, 78, 111, 145, 5, 41, 78, 116, 155, 195, 236, 278, 321, 365, 410, 456, 503, 551, 600, 50, 101, 153, 206, 260, 315, 371, 428, 486, 545, 605, 666, 728, 791, 855, 920, 986, 1053
Offset: 1

Views

Author

Scott R. Shannon, Sep 03 2020

Keywords

Comments

This is a variation of A337490; here we start with an offset of 1, so a(1) = 1. See that sequence for further details.
In the first 4212 terms the sequence decreases 69 times while 45 terms are repeated, the first being 13 at n=9 and the last 399876 at n=4212. After n(4166)=84 the sequence does not decrease again for n up to at least 100 million. The lowest numbers that have not appeared in that range are 30,37,47,48,49,51. The 100 millionth term is 4999999941527298.

Examples

			a(2) = 3 as the sum of all previous terms is a(1) = 1, and the GCD of 1 and 2 is 1. However 1 has already appeared so a(2) = a(1) + n = 1 + 2 = 3.
a(4) = 2 as the sum of all previous terms is a(1)+a(2)+a(3) = 10, and the GCD of 10 and 4 is 2, and as 2 has not previous appeared a(4) = 2.
a(8) = 4 as the sum of all previous terms is a(1)+...+a(7) = 52, and the GCD of 52 and 8 is 4, and as 4 has not previous appeared a(8) = 4.
		

Crossrefs

Cf. A337490 (same sequence rules but starting a(0)=1), A333980, A165430, A064814, A082299, A005132, A336957.

Programs

  • PARI
    lista(nn) = {my(va = vector(nn), s=0); va[1] = 1; s += va[1]; for (n=2, nn, my(g = gcd(n, s)); if (#select(x->(x==g), va), va[n] = va[n-1]+n, va[n] = g); s += va[n];); va;} \\ Michel Marcus, Sep 05 2020

A334880 Numbers k such that gcd(k, k-th composite number) > 1.

Original entry on oeis.org

2, 5, 6, 7, 10, 12, 14, 15, 16, 18, 20, 21, 22, 24, 26, 28, 30, 32, 34, 36, 42, 48, 50, 51, 52, 54, 55, 56, 60, 62, 63, 64, 65, 70, 72, 74, 75, 76, 77, 78, 80, 81, 82, 93, 96, 98, 99, 102, 104, 105, 110, 112, 114, 120, 122, 124, 126, 128, 130, 132, 138, 148
Offset: 1

Views

Author

Clark Kimberling, Jul 17 2020

Keywords

Examples

			In the following table, c(k) = A002808(k) = k-th composite number.
  k     c(k)   gcd(k, c(k))
  1      4         1
  2      6         2
  3      8         1
  4      9         1
  5     10         5
  6     12         6
2, 5, 6 are in this sequence, and 1,3,4 are in A073258.
		

Crossrefs

Cf. A002808, A064814, A073258 (complement), A336323.

Programs

  • Mathematica
    c = Select[Range[2, 150], ! PrimeQ[#] &]; (* A002808 *)
    Select[Range[Length[c]], GCD[c[[#]], #] > 1 &]  (* A334880 *)
    Module[{nn=200,cmps,len},cmps=Select[Range[nn],CompositeQ];len=Length[ cmps];Select[Thread[{Range[len],cmps}],GCD@@#>1&]][[All,1]] (* Harvey P. Dale, Sep 20 2020 *)
  • PARI
    lista(nn) = {my(n=0, list=List()); forcomposite (c=1, nn, n++; if (gcd(n, c) > 1, listput(list, n))); Vec(list);} \\ Michel Marcus, Jul 19 2020

A073260 Length of FixedPointList leading to value of [10^n]-th composite number.

Original entry on oeis.org

4, 4, 4, 5, 5, 6, 7, 7, 7, 8, 8, 9, 9
Offset: 1

Views

Author

Labos Elemer, Jul 22 2002

Keywords

Comments

One plus the number of iterations necessary to reach the composite number using the formula in the program. - Robert G. Wilson v, Jul 23 2002

Examples

			n=10^11: the list= {100000000000, 104118054814, 104280509328, 104286914053, 104287166025, 104287176027, 104287176414, 104287176419}, its length including initial term is 8, so a(11)=8.
		

Crossrefs

Programs

  • Mathematica
    Table[Length[FixedPointList[10^w+PrimePi[ # ]+1&, 10^w]]-1, {w, 1, 11}]

Formula

See program below.

Extensions

More terms from Robert G. Wilson v, Jul 23 2002

A118310 a(n) = gcd(n,m(n)), where m(n) is the n-th nonprime positive integer (1 or composite).

Original entry on oeis.org

1, 2, 3, 4, 1, 2, 1, 2, 3, 2, 1, 4, 1, 2, 3, 1, 1, 9, 1, 10, 1, 11, 1, 1, 1, 2, 3, 4, 1, 2, 1, 2, 3, 1, 5, 3, 1, 2, 1, 8, 1, 2, 1, 2, 9, 2, 1, 6, 1, 1, 1, 4, 1, 3, 1, 7, 3, 2, 1, 2, 1, 1, 1, 1, 1, 6, 1, 4, 3, 2, 1, 24, 1, 1, 25, 2, 1, 3, 1, 4, 1, 1, 1, 6, 5, 2, 3, 2, 1, 30, 1, 2, 3, 2, 5, 6, 1, 1, 1, 4, 1, 2, 1
Offset: 1

Views

Author

Leroy Quet, May 14 2006

Keywords

Comments

For n >= 1, a(n+1) = gcd(n+1,c(n)), where c(n) is the n-th composite.
First occurrence of k: 1, 2, 3, 4, 35, 48, 56, 40, 18, 20, 22, 120, 130, 140, 375, ..., . - Robert G. Wilson v
Question: What is the reason for the conspicuous arc-like structures in the scatter plot? - Antti Karttunen, Mar 02 2023

Crossrefs

Cf. A064814.

Programs

  • Mathematica
    NonPrime[n_Integer] := FixedPoint[n + PrimePi@# &, n + PrimePi@n]; f[n_] := GCD[n, NonPrime@n]; Array[f, 103] (* Robert G. Wilson v *)
  • PARI
    A002808(maxn)= { local(a); a=[4]; for(n=5,maxn, if( !isprime(n), a=concat(a,n); ); ); return(a); } A118310(maxn)= { local(nonppo,a,newa,nonppol); a=[;]; nonppo=concat(1,A002808(maxn)); nonppol=matsize(nonppo); for(n=1,nonppol[2], newa= gcd(n, nonppo[n]); a=concat(a,newa); ); return(a); } print(A118310(180)); \\ R. J. Mathar
    
  • PARI
    A118310(n) = if(1==n, n, my(x=n-1); for(k=2, oo, if(!isprime(k), x--; if(!x, return(gcd(n,k)))))); \\ Antti Karttunen, Mar 02 2023

Extensions

More terms from Robert G. Wilson v and R. J. Mathar, May 16 2006
Showing 1-10 of 11 results. Next