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.

A240231 Number of factors needed in the unique factorization of positive integers into terms of A186285 where any term is used at most twice.

Original entry on oeis.org

1, 1, 1, 2, 1, 2, 1, 1, 2, 2, 1, 3, 1, 2, 2, 2, 1, 3, 1, 3, 2, 2, 1, 2, 2, 2, 1, 3, 1, 3, 1, 3, 2, 2, 2, 4, 1, 2, 2, 2, 1, 3, 1, 3, 3, 2, 1, 3, 2, 3, 2, 3, 1, 2, 2, 2, 2, 2, 1, 4, 1, 2, 3, 2, 2, 3, 1, 3, 2, 3, 1, 3, 1, 2, 3, 3, 2, 3, 1, 3, 2, 2, 1, 4, 2, 2, 2, 2, 1, 4, 2, 3, 2, 2, 2, 4, 1, 3, 3, 4, 1, 3, 1, 2, 3
Offset: 1

Views

Author

Wolfdieter Lang, May 15 2014

Keywords

Comments

The number 1 with factorization defined to be 1 has been included. See a comment on A240230.
This is the row length sequence for the table A240230.
a(n) = 1 if and only if n = 1 or n is a term of A186285.

Examples

			a(12) = 3 because the usual prime factorization is 12 = 2^2*3^1 and (2)_3 = [2] and (1)_3 = [1], hence the sum of the base-3 representations of the exponents is 3.
a(24) = 2 as 24 = 3*8, using two factors from A186285. Note also how 3*8 = 3^1 * 2^3, and ternary representations of 1 and 3 are "1" and "10", thus their digit sum is 2. - _Antti Karttunen_, Aug 12 2017
a(36) = 4 from 2^2*3^2, (2)_3 = [2] and 2 + 2 = 4.
		

Crossrefs

Programs

  • Mathematica
    Block[{nn = 105, s}, s = Select[Select[Range@ nn, PrimePowerQ], IntegerQ@ Log[3, FactorInteger[#][[1, -1]]] &]; {1}~Join~Table[Length@ Rest@ NestWhileList[Function[{k, m}, {k/#, #} &@ SelectFirst[Reverse@ TakeWhile[s, # <= k &], Divisible[k, #] &]] @@ # &, {n, 1}, First@ # > 1 &][[All, -1]], {n, 2, nn}]] (* Michael De Vlieger, Aug 14 2017 *)
    a[n_] := Total[Plus @@ IntegerDigits[#, 3] & /@ (FactorInteger[n][[;; , 2]])]; Array[a, 100] (* Amiram Eldar, May 18 2023 *)
  • Scheme
    (define (A240231 n) (if (= 1 n) n (A240231with_a1_0 n)))
    (definec (A240231with_a1_0 n) (if (= 1 n) 0 (+ (A053735 (A067029 n)) (A240231with_a1_0 (A028234 n)))))
    ;; Antti Karttunen, Aug 12 2017

Formula

a(n) is, for n >= 2, the sum of all entries in the base 3 representation of the exponents of the primes in the usual prime number factorization of n.
From Antti Karttunen, Aug 12 2017: (Start)
That is, apart from the initial term, additive with a(p^e) = A053735(e).
Define b(1) = 0; and for n > 1, b(n) = A053735(A067029(n)) + b(A028234(n)). Then a(n) = b(n) for n > 1, with a(1) = 1 by convention.
(End)
Sum_{k=1..n} a(k) ~ n * (log(log(n)) + B + C), where B is Mertens's constant (A077761) and C = Sum_{p prime} f(1/p) = 0.38090372984518844518..., where f(x) = -x + Sum_{k>=0} (x^(3^k) + 2*x^(2*3^k))/(1 + x^(3^k) + x^(2*3^k)). - Amiram Eldar, Sep 28 2023

Extensions

Description clarified and more terms added by Antti Karttunen, Aug 12 2017