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.

Previous Showing 71-72 of 72 results.

A351741 Numbers k such that the concatenation of 1,2,...,k and the concatenation of k,k-1,...,1 have the same number of prime factors, counted with multiplicity.

Original entry on oeis.org

1, 3, 4, 5, 7, 10, 13, 16, 23, 26, 31, 32, 37, 39, 51, 54, 56
Offset: 1

Views

Author

J. M. Bergot and Robert Israel, Feb 17 2022

Keywords

Comments

Numbers k such that A001222(A007908(k)) = A001222(A000422(k)).

Examples

			a(3) = 4 is a term because 1234 = 2*617 and 4321 = 29*149 each have two prime factors.
		

Crossrefs

Programs

  • Maple
    dcat:= (a,b) -> a*10(1+ilog10(b))+b:
    a:= 1: b:= 1: R:= 1:
    for n from 2 to 40 do
    a:= dcat(n,a);
    b:= dcat(b,n);
    if numtheory:-bigomega(a) = numtheory:-bigomega(b) then R:= R,n fi
    od:
    R;
  • Mathematica
    Select[Range[32], SameQ @@ PrimeOmega@{FromDigits@ Flatten@ #, FromDigits@ Flatten@ Reverse[#]} &@ IntegerDigits@ Range[#] &] (* Michael De Vlieger, Feb 17 2022 *)
  • Python
    from sympy import primeomega
    def afind(limit, startk=1):
        k = startk
        sk = "".join(str(i) for i in range(1, k))
        skr = "".join(str(i) for i in range(k-1, 0, -1))
        for k in range(startk, limit+1):
            sk += str(k)
            skr = str(k) + skr
            if primeomega(int(sk)) == primeomega(int(skr)):
                print(k, end=", ")
    afind(23) # Michael S. Branicky, Feb 17 2022

Extensions

a(17) from Michael S. Branicky, Feb 19 2022

A386985 Smallest k > 0 such that the base-n number formed by concatenating k, k - 1, ..., 2, 1 (each written in base n) is prime, or -1 if no such k exists for the given n.

Original entry on oeis.org

2, 2, 4, 2, 2, 373, 2, 2, 82, 2, 3
Offset: 2

Views

Author

Marco RipĂ , Aug 11 2025

Keywords

Comments

If a(13) != -1, then the corresponding prime must have more than 4178 decimal digits.
Sequence continues n=13..36: ?, 2, 2, 28, 362, 2, ?, 2, 2, 4, 2, 3, ?, 2, 5, 4, 2, 2, 37, 3, 2, 4, 2, 2.
The increasing-order analog begins 15, 2, ?. See A048436.

Examples

			a(3) = 2 since 21_(base-3) = 7_(base-10), which is prime.
		

Crossrefs

Programs

  • PARI
    f(n, b) = my(p=1, L=1); sum(k=1, n, k*p*=L+(k==L&&!L*=b)); \\ adapted from A000422
    a(n) = my(k=1); while (!ispseudoprime(f(k, n)), k++); k; \\ Michel Marcus, Aug 16 2025
Previous Showing 71-72 of 72 results.