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

A230595 Number of ways to write n as n = x*y, where x and y are primes, 1 <= x <= n, 1 <= y <= n.

Original entry on oeis.org

0, 0, 0, 1, 0, 2, 0, 0, 1, 2, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 2, 2, 0, 0, 1, 2, 0, 0, 0, 0, 0, 0, 2, 2, 2, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 2, 0, 0, 1, 0, 2, 0, 0, 0, 2, 0, 2, 2, 0, 0, 0, 2, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 0, 2, 0, 0, 2, 0, 0, 0, 0, 2, 0, 0, 2, 2, 2
Offset: 1

Views

Author

Jaroslav Krizek, Oct 27 2013

Keywords

Comments

Dirichlet convolution of A010051(n) with itself, where A010051 = characteristic function of primes (A000040).
Dirichlet convolution of functions b(n) and c(n) is function a(n) = Sum_(d|n) b(d) * c(n/d).
a(n) = 0, 1 or 2. a(n) = 0 for numbers n from A100959 (non-semiprimes); a(n) = 1 for n = p^2, p = prime; a(n) = 2 for numbers n from A006881 (product of two distinct primes).

Examples

			For n = 6: a(6) = Sum_(d|6) A010051(d) * A010051(6/d) = 0*0 + 1*1 + 1*1 + 1*0 = 2.
		

Crossrefs

Programs

  • Mathematica
    Table[Total@ Map[Times @@ Boole@ {PrimeQ@ #, PrimeQ[n/#]} &, FactorInteger[n][[All, 1]]], {n, 95}] (* Michael De Vlieger, Jul 29 2017 *)
  • PARI
    a(n)=sumdiv(n,d,isprime(d)*isprime(n/d)) \\ Ralf Stephan, Oct 30 2013
    
  • PARI
    a(n) = my(f=factor(f)); (vecsum(f[, 2])==2) * #f~ \\ David A. Corneth, Jul 28 2017
    
  • PARI
    first(n) = my(v = vector(n)); forprime(p = 2, sqrtint(n), v[p^2] = 1; forprime(q = p + 1, n \ p, v[p*q] = 2)); v \\ David A. Corneth, Jul 28 2017
    
  • Python
    from sympy import factorint
    def A230595(n): return 0 if sum(f:=factorint(n).values())!=2 else len(f) # Chai Wah Wu, Jul 23 2024

Formula

a(n) = Sum_(d|n) A010051(d) * A010051(n/d).
Dirichlet g.f.: primezeta(s)^2. - Benedict W. J. Irwin, Jul 11 2018

A346219 Base-10 numbers k such that k can be written as k = A * B and R(k) = R(A) * R(B) in six or more bases, from base 2 to base 10, and where R(k), the digit reversal of k, is read as a number in the same base.

Original entry on oeis.org

1122, 17875, 65331, 367598, 818545, 1997905, 43998955, 100383283, 112887775, 112977865, 145683265, 230034805, 5231187650
Offset: 1

Views

Author

Keywords

Comments

This is a variation of the sequence A346133. Similar rules are used to determine the allowed values of A and B - neither number can have a leading 0, and both cannot be palindromes. However the reverse of k may appear as in general any solutions for k and R(k) will occur in different bases.
This sequence lists those base-10 numbers that meet these criteria in six or more bases, from base 2 to base 10. Note that, although k must stay the same when written in the different bases, the values of A and B need not be the same. Only the product of the chosen two factors and their reverses must equal k and R(k) in the given bases. See the example below and the linked data file.
No numbers are currently known that have solutions in seven or more bases. Assuming a(13) exists it is greater than 10^9.

Examples

			1122 is a term as k = A * B and R(k) = R(A) * R(B) has solutions in the six bases 4,5,7,8,9,10. See the table below for k = 1122.
.
      base   | k_base | A_base * B_base | R(k_base) | R(A_base) * R(B_base)
  =========================================================================
       4     | 101202 |    101 * 1002   |  202101   |       101 * 2001
  in base 10 |   1122 |     17 * 66     |    2193   |        17 * 129
  ------------------------------------------------------------------------
       5     |  13442 |      3 * 2444   |   24431   |         3 * 4442
  in base 10 |   1122 |      3 * 374    |    1866   |         3 * 622
  ------------------------------------------------------------------------
       7     |   3162 |     31 * 102    |    2613   |        13 * 201
  in base 10 |   1122 |     22 * 51     |     990   |        10 * 99
  -------------------------------------------------------------------------
       8     |   2142 |     21 * 102    |    2412   |        12 * 201
  in base 10 |   1122 |     17 * 66     |    1290   |        10 * 129
  -------------------------------------------------------------------------
       9     |   1476 |     12 * 123    |    6741   |        21 * 321
  in base 10 |   1122 |     11 * 102    |    4978   |        19 * 262
  -------------------------------------------------------------------------
      10     |   1122 |     11 * 102    |    2211   |        11 * 201
.
The bases used in the twelve terms below 10^9 are as follows:
.
         k    |       bases
  --------------------------------
        1122  |  4, 5, 7, 8, 9, 10
       17875  |  2, 3, 4, 6, 8, 10
       65331  |  2, 4, 5, 6, 8, 10
      367598  |  3, 4, 6, 8, 9, 10
      818545  |  2, 3, 4, 6, 8,  9
     1997905  |  2, 3, 4, 6, 8,  9
    43998955  |  2, 3, 4, 8, 9, 10
   100383283  |  2, 3, 4, 6, 9, 10
   112887775  |  2, 3, 4, 8, 9, 10
   112977865  |  2, 3, 4, 8, 9, 10
   145683265  |  2, 3, 4, 6, 8,  9
   230034805  |  2, 3, 4, 6, 8,  9
.
		

Crossrefs

Extensions

a(13) from Michael S. Branicky, Jun 21 2023

A346288 Base-10 numbers k such that k has no solutions to k = A * B and R(k) = R(A) * R(B) in any base from base 2 to base 10, and where R(k), the digit reversal of k, is read as a number in the same base.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 15, 17, 19, 20, 21, 23, 25, 29, 31, 32, 35, 37, 40, 41, 43, 47, 53, 55, 59, 60, 61, 65, 67, 70, 71, 73, 75, 77, 79, 80, 83, 85, 87, 89, 92, 94, 97, 98, 100, 101, 103, 106, 107, 109, 113, 114, 115, 127, 128, 129, 131, 137, 139, 141, 142, 145, 147
Offset: 1

Views

Author

Keywords

Comments

This sequence uses the same rules to determine the numbers k as A346219 except that here the sequence includes only those numbers which have no solution to the two equalities k = A * B and R(k) = R(A) * R(B) in any base, from base 2 to base 10.
There are 8868747 terms less than 10 million. In that range the longest run where each consecutive number has one or more solutions to the equalities, thus do not appear in this sequence, is from 116 to 126.

Examples

			The first number not in the sequence is 14 as 14 = 2 * 7 and 22 = 2 * 11, and when written in base 5 those become 24 = 2 * 12 and 42 = 2 * 21. These satisfy the two equalities thus 14 is not a term in this sequence.
The second number not in the sequence is 16 as 16 = 2 * 8 and 26 = 2 * 13, which when written in base 6 become 24 = 2 * 12 and 42 = 2 * 21, which satisfy the equalities.
The third number not in the sequence is 18 as 18 = 2 * 9 and 30 = 2 * 15, which when written in base 7 become 24 = 2 * 12 and 42 = 2 * 21, which satisfy the equalities.
		

Crossrefs

Showing 1-3 of 3 results.