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-2 of 2 results.

A380984 Primes p such that p*(p-1) consists of exactly two different decimal digits.

Original entry on oeis.org

5, 7, 11, 17, 67, 101, 167, 1667, 166667, 666667, 66666667, 666666667, 1666666667, 66666666667, 166666666667, 166666666666667, 66666666666666666667
Offset: 1

Views

Author

Robert Israel, Feb 11 2025

Keywords

Comments

Primes in A380974.
Contains (10^k+2)/6 for k in A076850 and (2*10^k + 1)/3 for k in A096507. It is conjectured that these sequences are infinite.
The last decimal digit of a(n)*(a(n)-1) is either 0, 2 or 6. - Chai Wah Wu, Feb 19 2025

Examples

			a(5) = 67 is a term because it is prime and 67 * 66 = 4422 consists of digits 2 and 4.
		

Crossrefs

Programs

  • Maple
    p:= 1: R:= NULL: count:= 0:
    while count < 11 do
    p:= nextprime(p);
    if nops(convert(convert(p*(p-1),base,10),set)) = 2 then
         R:= R,p; count:= count+1
    fi;
    od:
    R;
  • Mathematica
    Select[Prime[Range[10^6]],Length[Union[IntegerDigits[#(#-1)]]]==2&] (* James C. McMahon, Feb 13 2025 *)
  • PARI
    isok(k) = isprime(k) && #Set(digits(k*(k-1))) == 2; \\ Michel Marcus, Feb 11 2025
    
  • Python
    from math import isqrt
    from itertools import count, combinations, product, islice
    from sympy import isprime
    def A380984_gen(): # generator of terms
        for n in count(1):
            c = []
            for a in combinations('0123456789',2):
                if '0' in a or '2' in a or '6' in a:
                    for b in product(a,repeat=n):
                        if b[0] != '0' and b[-1] in {'0','2','6'} and b != (a[0],)*n and b != (a[1],)*n:
                            m = int(''.join(b))
                            q = isqrt(m)
                            if q*(q+1)==m and isprime(q+1):
                                c.append(q+1)
            yield from sorted(c)
    A380984_list = list(islice(A380984_gen(),10)) # Chai Wah Wu, Feb 19 2025

Extensions

a(12)-a(17) from Jinyuan Wang, Feb 12 2025

A383971 Triprimes with sum of digits 3.

Original entry on oeis.org

12, 30, 102, 1002, 2001, 10002, 10011, 11001, 20001, 100101, 101001, 110001, 200001, 1000002, 10001001, 10010001, 11000001, 20000001, 100000101, 1000000011, 1000001001, 1000010001, 1000100001, 1001000001, 1010000001, 10000000002, 10000000011, 10000010001, 11000000001, 100000000101, 100000001001
Offset: 1

Views

Author

Robert Israel, May 16 2025

Keywords

Comments

Numbers that are the product of 3 primes, counted with multiplicity, and whose sum of decimal digits is 3.
Since all terms are divisible by 3, the only term ending with 0 is 30. All others are of the form 10^i + 10^j + 1 with 0 <= j <= i.
For each d from 2 to at least 71, there is at least one term with d digits.
Includes 10^k + 2 for k in A076850.
All terms except 12 are squarefree.
All even terms are Zumkeller numbers (A083207). - Ivan N. Ianakiev, May 18 2025

Examples

			a(4) = 1002 is a term because 1+0+0+2 = 3 and 1002 = 2 * 3 * 167 is the product of 3 primes, counted with multiplicity.
		

Crossrefs

Intersection of any two of A014612, A050689, and A052217.

Programs

  • Maple
    istriprime:= proc(n) local F;
      F:= ifactors(n,easy)[2];
      if not hastype(F,symbol) then return convert(F[..,2],`+`)=3 fi;
      F:= remove(hastype,F,symbol);
      if nops(F) > 1 or (nops(F) = 1 and F[1,2] > 1) then return false fi;
      numtheory:-bigomega(n) = 3
    end proc:
    R:= 12, 30:
    for d from 3 to 30 do
      V:= select(istriprime, [seq(seq(10^(d-1) + 10^j + 1,j=0..d-1)]);
      R:= R,op(V);
    od:
    R;
  • Mathematica
    s={30};imax=11;Do[n=10^i+10^j+1;If[PrimeOmega[n]==3,AppendTo[s,n]],{i,0,imax},{j,0,i}];Sort[s] (* James C. McMahon, Jun 01 2025 *)
Showing 1-2 of 2 results.