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

A354148 Index of prime(n) in A090252.

Original entry on oeis.org

2, 3, 4, 6, 8, 9, 10, 12, 13, 16, 17, 18, 19, 20, 21, 22, 24, 25, 26, 27, 28, 30, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 61, 62, 64, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 97, 98, 99, 100
Offset: 1

Views

Author

N. J. A. Sloane, May 22 2022

Keywords

Comments

All the primes appear in A090252 and in their correct order.

Examples

			A090252 begins 1, 2, 3, 5, 4, 7, 9, ..., so the indices of the primes are 2, 3, 4, 6, ...
		

Crossrefs

Programs

  • Python
    from math import gcd, prod
    from sympy import isprime
    from itertools import count, islice
    def agen(): # generator of terms
        alst, aset, mink = [1], {1}, 2
        for n in count(2):
            k, s = mink, n - n//2
            prodall = prod(alst[n-n//2-1:n-1])
            while k in aset or gcd(prodall, k) != 1: k += 1
            alst.append(k); aset.add(k)
            if isprime(k): yield n
            while mink in aset: mink += 1
    print(list(islice(agen(), 83))) # Michael S. Branicky, May 23 2022

A354159 Terms 2*p (p prime) in A090252, divided by 2, in order of appearance.

Original entry on oeis.org

2, 13, 103, 239, 499, 1567, 3257, 6971, 14447, 30259, 63317, 130699
Offset: 1

Views

Author

N. J. A. Sloane, May 30 2022

Keywords

Comments

By definition, 2*a(n) is a term in A354255.
Conjecture: the indices of the terms 2*p in A090252 are terms in A083329.

Examples

			The indices in A090252 of the initial terms 2*p, the terms 2*p themselves, and the primes p are [5, 4, 2], [47, 26, 13], [767, 206, 103], [3071, 478, 239].
		

Crossrefs

Extensions

a(6)-a(8) from Michael S. Branicky, Jun 04 2022 using A354255
a(9)-a(11) from Hugo van der Sanden, Jun 14 2022
a(12) from Jinyuan Wang, Jul 15 2022

A355057 a(n) = product of prohibited prime factors of A090252(n).

Original entry on oeis.org

1, 1, 2, 6, 15, 30, 70, 210, 462, 6006, 51051, 102102, 277134, 6374082, 10623470, 223092870, 588153930, 18232771830, 51893273670, 2127624220470, 5381637734130, 252936973504110, 6702829797858915, 13405659595717830, 41628100849860630, 2539314151841498430, 7397132529277408470
Offset: 1

Views

Author

Michael De Vlieger, Jun 16 2022

Keywords

Comments

Let s(n) = A090252(n) and let K(n) = A007947(n) = squarefree kernel of n.
Prime p | s(n) implies p does not divide s(n+j), 1 <= j <= n.
Therefore a(n) is the product of primes p that cannot divide s(n).
a(n) = product of distinct primes that divide a(j) for floor((n+1)/2) <= j <= n-1. - N. J. A. Sloane, Jun 17 2022

Examples

			a(1) = 1;
a(2) = 1 since s(1) = 1, and (2-1)/2 is not an integer;
a(3) = a(2) * K(s(2)) / K(s((3-1)/2)) = 1 * 2 / 1 = 2;
a(4) = a(3) * K(s(3)) = 2 * 3 = 6;
a(5) = a(4) * K(s(4)) / K(s((5-1)/2)) = 6 * 5 / 2 = 15;
a(6) = a(5) * K(s(5)) = 15 * 2 = 30;
a(7) = a(6) * K(s(6)) / K(s((7-1)/2)) = 30 * 7 / 3 = 70;
etc.
		

Crossrefs

See A354758 for another version.
A354765 is a binary encoding.

Programs

  • Maple
    # To get first M terms, from N. J. A. Sloane, Jun 18 2022
    with(numtheory);
    M:=20; ans:=[1,1,2];
    for i from 4 to M do
    S:={}; j1:=floor((i+1)/2); j2:=i-1;
      for j from j1 to j2 do S:={op(S), op(factorset(b252[j]))} od:
    t2 := product(S[k], k = 1..nops(S));
    ans:=[op(ans),t2];
    od:
    ans;
  • Mathematica
    Block[{s = Import["https://oeis.org/A090252/b090252.txt", "Data"][[1 ;; 120, -1]], m = 1}, Reap[Do[m *= Times @@ FactorInteger[s[[If[# == 0, 1, #] &[i - 1]]]][[All, 1]]; If[IntegerQ[#] && # > 0, m /= Times @@ FactorInteger[s[[#]]][[All, 1]]] &[(i - 1)/2]; Sow[m], {i, Length[s]}] ][[-1, -1]] ]
  • Python
    from math import prod, lcm, gcd
    from itertools import count, islice
    from collections import deque
    from sympy import primefactors
    def A355057_gen(): # generator of terms
        aset, aqueue, c, b, f = {1}, deque([1]), 2, 1, True
        yield 1
        while True:
            for m in count(c):
                if m not in aset and gcd(m,b) == 1:
                    yield prod(primefactors(b))
                    aset.add(m)
                    aqueue.append(m)
                    if f: aqueue.popleft()
                    b = lcm(*aqueue)
                    f = not f
                    while c in aset:
                        c += 1
                    break
    A355057_list = list(islice(A355057_gen(),20)) # Chai Wah Wu, Jun 18 2022

Formula

a(n) = a(n-1) * K(s(n-1)) / K(s((n-1)/2)), where the last operation is only carried out iff (n-1)/2 is an integer.

A354164 Indices of nonprimes in A090252.

Original entry on oeis.org

1, 5, 7, 11, 14, 15, 23, 29, 31, 32, 47, 59, 60, 63, 65, 95, 96, 119, 120, 121, 127, 128, 131, 132, 191, 193, 239, 241, 243, 244, 255, 257, 263, 264, 265, 383, 387, 388, 479, 480, 483, 484, 487, 488, 489, 511, 512, 515, 527, 529, 531, 571, 767, 775, 776, 777, 959, 960, 961, 967, 968, 969, 975, 976, 977, 979, 980, 1023, 1031, 1055, 1056, 1059, 1063
Offset: 1

Views

Author

N. J. A. Sloane, May 31 2022

Keywords

Crossrefs

A354758 a(n) = Product_{k = ceiling(n/2)..n-1} A090252(k).

Original entry on oeis.org

1, 1, 2, 6, 15, 60, 140, 1260, 2772, 36036, 153153, 1225224, 3325608, 76488984, 212469400, 4461857400, 11763078600, 364655436600, 1037865473400, 42552484409400, 107632754682600, 5058739470082200, 33514148989294575, 536226383828713200, 1665124033994425200
Offset: 1

Views

Author

Rémy Sigrist, Jun 06 2022

Keywords

Comments

The prime divisors of a(n) are forbidden in A090252(n).

Examples

			a(7) = A090252(4) * A090252(5) * A090252(6) = 5 * 4 * 7 = 140.
		

Crossrefs

A355057 is another version.

Programs

  • Mathematica
    With[{s = Import["https://oeis.org/A090252/b090252.txt", "Data"][[1 ;; 25, -1]]}, Table[Product[s[[k]], {k, Ceiling[n/2], n - 1}], {n, Length[s]}]] (* Michael De Vlieger, Aug 28 2022 *)
  • PARI
    See Links section.

Formula

gcd(a(n), A090252(n)) = 1.

A354160 Products of exactly two distinct primes in A090252, in order of appearance.

Original entry on oeis.org

21, 55, 26, 85, 57, 161, 319, 217, 481, 205, 731, 517, 159, 1121, 1403, 871, 355, 1241, 869, 2407, 1691, 413, 3007, 2323, 206, 1391, 4033, 565, 5207, 2227, 5891, 6533, 4321, 453, 1007, 623, 4867, 2231, 6161, 2119, 11189, 6401, 12709, 7421, 2159, 9563, 8213, 1507, 15247, 9259, 4031, 12367, 597, 2869, 11183, 1561, 13393, 7099, 3611, 14213, 478, 24823
Offset: 1

Views

Author

N. J. A. Sloane, May 30 2022

Keywords

Crossrefs

Programs

  • Mathematica
    Select[Import["https://oeis.org/A090252/b090252.txt", "Data"][[1 ;; 2000, -1]], PrimeNu[#] == PrimeOmega[#] == 2 &] (* Michael De Vlieger, Jun 16 2022 *)
  • Python
    from itertools import count, islice
    from collections import deque
    from math import gcd, lcm
    from sympy import factorint
    def A354160_gen(): # generator of terms
        aset, aqueue, c, b, f = {1}, deque([1]), 2, 1, True
        while True:
            for m in count(c):
                if m not in aset and gcd(m,b) == 1:
                    if len(fm := factorint(m)) == sum(fm.values()) == 2:
                        yield m
                    aset.add(m)
                    aqueue.append(m)
                    if f: aqueue.popleft()
                    b = lcm(*aqueue)
                    f = not f
                    while c in aset:
                        c += 1
                    break
    A354160_list = list(islice(A354160_gen(),25)) # Chai Wah Wu, May 31 2022

A354161 Index of A354160(n) in A090252.

Original entry on oeis.org

15, 29, 47, 59, 63, 65, 121, 131, 193, 239, 241, 243, 255, 257, 265, 387, 479, 483, 487, 489, 515, 527, 529, 531, 767, 775, 777, 959, 961, 967, 969, 977, 979, 1023, 1031, 1055, 1059, 1063, 1143, 1551, 1553, 1555, 1921, 1923, 1935, 1937, 1939, 1951, 1953, 1955, 1959, 1961, 2047, 2063, 2064, 2111, 2113, 2119, 2127, 2288, 3071, 3073, 3105, 3107
Offset: 1

Views

Author

N. J. A. Sloane, May 30 2022

Keywords

Crossrefs

Programs

  • Python
    from itertools import count, islice
    from collections import deque
    from math import gcd, lcm
    from sympy import factorint
    def A354161_gen(): # generator of terms
        aset, aqueue, c, b, f, i = {1}, deque([1]), 2, 1, True, 1
        while True:
            for m in count(c):
                if m not in aset and gcd(m,b) == 1:
                    i += 1
                    if len(fm := factorint(m)) == sum(fm.values()) == 2:
                        yield i
                    aset.add(m)
                    aqueue.append(m)
                    if f: aqueue.popleft()
                    b = lcm(*aqueue)
                    f = not f
                    while c in aset:
                        c += 1
                    break
    A354161_list = list(islice(A354161_gen(),25)) # Chai Wah Wu, May 31 2022

A354165 Nonprimes in A090252 in order of appearance.

Original entry on oeis.org

1, 4, 9, 8, 25, 21, 16, 55, 27, 49, 26, 85, 121, 57, 161, 32, 169, 125, 289, 319, 81, 361, 217, 529, 64, 481, 205, 731, 517, 841, 159, 1121, 343, 961, 1403, 128, 871, 1369, 355, 1681, 1241, 1849, 869, 2209, 2407, 243, 2809, 1691, 413, 3007, 2323, 3721, 206, 1391, 4489, 4033, 565, 5041, 5207, 2227, 5329, 5891, 1331, 6241, 6533, 4321, 6889, 453
Offset: 1

Views

Author

N. J. A. Sloane, May 31 2022

Keywords

Crossrefs

A354166 Number of nonprimes among first n terms of A090252.

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 3, 3, 3, 3, 4, 4, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 8, 8, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 12, 13, 13, 13, 14, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 16, 17
Offset: 1

Views

Author

N. J. A. Sloane, May 31 2022

Keywords

Comments

It appears that this sequence controls the growth of A090252. That is, almost all the terms of A090252 lie on the line A090252(n) = k-th prime, where k = n - a(n).

Crossrefs

A354255 Even numbers in A090252 in order of appearance.

Original entry on oeis.org

2, 4, 8, 16, 26, 32, 64, 128, 206, 256, 478, 512, 998, 1024, 2048, 3134, 4096, 6514, 8192, 13942, 16384, 28894, 32768, 60518, 65536, 126634, 131072, 261398, 262144
Offset: 1

Views

Author

Michael S. Branicky, May 21 2022

Keywords

Comments

The n-th even term in A090252 appears at index k <= A083329(n).
Conjecture: The indices of even numbers in A090252 are precisely the numbers {A083329(n), n >= 1}. See A090252 for discussion. - N. J. A. Sloane, May 22 2022
Taking logs to base 2 of these terms produces 1., 2., 3., 4., 4.700439718, 5., 6., 7., 7.686500527, 8., 8.900866807, 9., 9.962896004, 10., 11., 11.61378946, 12., 12.66932800, 13., 13.76714991, 14. - N. J. A. Sloane, Jun 01 2022

Crossrefs

Programs

  • Python
    from math import gcd, prod
    from itertools import count, islice
    def agen(): # generator of terms
        alst, aset, mink = [1], {1}, 2
        for n in count(2):
            k, s = mink, n - n//2
            prodall = prod(alst[n-n//2-1:n-1])
            while k in aset or gcd(prodall, k) != 1: k += 1
            alst.append(k); aset.add(k)
            if k%2 == 0: yield k
            while mink in aset: mink += 1
    print(list(islice(agen(), 9))) # Michael S. Branicky, May 23 2022

Extensions

a(14) from Michael S. Branicky, May 26 2022
a(15)-a(21) from Michael S. Branicky, Jun 01 2022 using gzipped b-file in A090252
a(22)-a(26) from Hugo van der Sanden, Jun 14 2022
a(27)-a(29) from Jinyuan Wang, Jul 15 2022
Showing 1-10 of 38 results. Next