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

A250477 Number of times prime(n) (the n-th prime) occurs as the least prime factor among numbers 1 .. (prime(n)^2 * prime(n+1)): a(n) = A078898(A251720(n)).

Original entry on oeis.org

6, 8, 12, 21, 33, 45, 63, 80, 116, 148, 182, 232, 265, 296, 356, 433, 490, 548, 625, 674, 740, 829, 919, 1055, 1187, 1252, 1313, 1376, 1446, 1657, 1897, 2029, 2134, 2301, 2484, 2605, 2785, 2946, 3110, 3301, 3439, 3654, 3869, 3978, 4086, 4349, 4811, 5147, 5273, 5395, 5604, 5787, 6049, 6403, 6684, 6954, 7153
Offset: 1

Views

Author

Antti Karttunen, Dec 14 2014

Keywords

Comments

a(n) = Position of 6 on row n of array A249821. This is always larger than A250474(n), the position of 4 on row n, as 4 is guaranteed to be the first composite term on each row of A249821.
From Antti Karttunen, Mar 29 2015: (Start)
a(n) = 1 + number of positive integers <= (prime(n)*prime(n+1)) whose smallest prime factor is at least prime(n).
That a(n) > A250474(n) can also be seen by realizing that prime(n) must occur at least as many times as the smallest prime factor for the numbers in range 1 .. (prime(n)^2 * prime(n+1)) than for numbers in (smaller) range 1 .. (prime(n)^3), and also by realizing that a(n) cannot be equal to A250474(n) because each row of A249822 is a permutation of natural numbers.
Or more simply, by considering the comment given in A256447 which follows from the new interpretation given above.
(End)

Crossrefs

Column 6 of A249822. Cf. also A250474 (column 4), A250478 (column 8).
First differences: A256446. Cf. also A256447, A256448.

Programs

  • Mathematica
    f[n_] := Count[Range[Prime[n]^2*Prime[n + 1]], x_ /; Min[First /@ FactorInteger[x]] == Prime@ n]; Array[f, 20] (* Michael De Vlieger, Mar 30 2015 *)
  • PARI
    allocatemem(234567890);
    A002110(n) = prod(i=1, n, prime(i));
    A250477(n) = { my(m); m = (prime(n) * prime(n+1)); sumdiv(A002110(n-1), d, (moebius(d)*(m\d))); };
    for(n=1, 23, print1(A250477(n),", "));
    \\ A more practical program:
    
  • PARI
    allocatemem(234567890);
    vecsize = (2^24)-4;
    v020639 = vector(vecsize);
    v020639[1] = 1; for(n=2,vecsize, v020639[n] = vecmin(factor(n)[, 1]));
    A020639(n) = v020639[n];
    A250477(n) = { my(p=prime(n),q=prime(n+1),u=p*q,k=1,s=1); while(k <= u, if(A020639(k) >= p, s++); k++); s; };
    for(n=1, 564, write("b250477.txt", n, " ", A250477(n)));
    \\ Antti Karttunen, Mar 29 2015

Formula

a(n) = A078898(A251720(n)).
a(1) = 1, a(n) = Sum_{d | A002110(n-1)} moebius(d) * floor(A006094(n) / d). [Follows when A251720, (p_n)^2 * p_{n+1} is substituted to the similar formula given for A078898. Here p_n is the n-th prime (A000040(n)), A006094(n) gives the product p_n * p{n+1} and A002110(n) gives the product of the first n primes. Because the latter is always squarefree, one could use here also Liouville's lambda (A008836) instead of Moebius mu (A008683)].
a(n) = A250474(n) + A256447(n).

A268733 a(n) = A000203(A251720(n)).

Original entry on oeis.org

28, 78, 248, 684, 1862, 3294, 6140, 9144, 16590, 27872, 37734, 59094, 75812, 90864, 121878, 171780, 219542, 257244, 328104, 378362, 432240, 530964, 627570, 785078, 969714, 1071512, 1157004, 1271270, 1366974, 1649024, 2145924
Offset: 1

Views

Author

Zak Seidov, Feb 12 2016

Keywords

Comments

Let p=prime(n)=A000040(n) and q=prime(n+1)=A000040(n+1) then a(n)=sigma(p^2*q)=1+p+q+p^2+ p*q+p^2*q.

Crossrefs

Programs

  • Mathematica
    p=1; Table[p=NextPrime[p];q=NextPrime[p];1+p+q+p^2+p*q+p^2*q,{20}]
  • PARI
    p=1;for(n=1,20,p=nextprime(p+1);q=nextprime(p+1);print1(sigma(p^2*q)","))

A246277 Column index of n in A246278: a(1) = 0, a(2n) = n, a(2n+1) = a(A064989(2n+1)).

Original entry on oeis.org

0, 1, 1, 2, 1, 3, 1, 4, 2, 5, 1, 6, 1, 7, 3, 8, 1, 9, 1, 10, 5, 11, 1, 12, 2, 13, 4, 14, 1, 15, 1, 16, 7, 17, 3, 18, 1, 19, 11, 20, 1, 21, 1, 22, 6, 23, 1, 24, 2, 25, 13, 26, 1, 27, 5, 28, 17, 29, 1, 30, 1, 31, 10, 32, 7, 33, 1, 34, 19, 35, 1, 36, 1, 37, 9, 38, 3, 39, 1, 40, 8, 41, 1, 42
Offset: 1

Views

Author

Antti Karttunen, Aug 21 2014

Keywords

Comments

If n >= 2, n occurs in column a(n) of A246278.
By convention, a(1) = 0 because 1 does not occur in A246278.

Crossrefs

Terms of A348717 halved. A305897 is the restricted growth sequence transform.
Positions of terms 1 .. 8 in this sequence are given by the following sequences: A000040, A001248, A006094, A030078, A090076, A251720, A090090, A030514.
Cf. A078898 (has the same role with array A083221 as this sequence has with A246278).
This sequence is also used in the definition of the following permutations: A246274, A246276, A246675, A246677, A246683, A249815, A249817 (A249818), A249823, A249825, A250244, A250245, A250247, A250249.
Also in the definition of arrays A249821, A251721, A251722.
Sum of prime indices of a(n) is A359358(n) + A001222(n) - 1, cf. A326844.
A112798 lists prime indices, length A001222, sum A056239.

Programs

  • Mathematica
    a246277[n_Integer] := Module[{f, p, a064989, a},
      f[x_] := Transpose@FactorInteger[x];
      p[x_] := Which[
        x == 1, 1,
        x == 2, 1,
        True, NextPrime[x, -1]];
      a064989[x_] := Times @@ Power[p /@ First[f[x]], Last[f[x]]];
      a[1] = 0;
      a[x_] := If[EvenQ[x], x/2, NestWhile[a064989, x, OddQ]/2];
    a/@Range[n]]; a246277[84] (* Michael De Vlieger, Dec 19 2014 *)
  • PARI
    A064989(n) = {my(f); f = factor(n); if((n>1 && f[1,1]==2), f[1,2] = 0); for (i=1, #f~, f[i,1] = precprime(f[i,1]-1)); factorback(f)};
    A246277(n) = { if(1==n, 0, while((n%2), n = A064989(n)); (n/2)); };
    
  • PARI
    A246277(n) = if(1==n, 0, my(f = factor(n), k = primepi(f[1,1])-1); for (i=1, #f~, f[i,1] = prime(primepi(f[i,1])-k)); factorback(f)/2); \\ Antti Karttunen, Apr 30 2022
    
  • Python
    from sympy import factorint, prevprime
    from operator import mul
    from functools import reduce
    def a064989(n):
        f=factorint(n)
        return 1 if n==1 else reduce(mul, [1 if i==2 else prevprime(i)**f[i] for i in f])
    def a(n): return 0 if n==1 else n//2 if n%2==0 else a(a064989(n))
    print([a(n) for n in range(1, 101)]) # Indranil Ghosh, Jun 15 2017
  • Scheme
    ;; two different variants, the second one employing memoizing definec-macro)
    (define (A246277 n) (if (= 1 n) 0 (let loop ((n n)) (if (even? n) (/ n 2) (loop (A064989 n))))))
    (definec (A246277 n) (cond ((= 1 n) 0) ((even? n) (/ n 2)) (else (A246277 (A064989 n)))))
    

Formula

a(1) = 0, a(2n) = n, a(2n+1) = a(A064989(2n+1)) = a(A064216(n+1)). [Cf. the formula for A252463.]
Instead of the equation for a(2n+1) above, we may write a(A003961(n)) = a(n). - Peter Munn, May 21 2022
Other identities. For all n >= 1, the following holds:
For all w >= 0, a(p_{i} * p_{j} * ... * p_{k}) = a(p_{i+w} * p_{j+w} * ... * p_{k+w}).
For all n >= 2, A001222(a(n)) = A001222(n)-1. [a(n) has one less prime factor than n. Thus each semiprime (A001358) is mapped to some prime (A000040), etc.]
For all n >= 2, a(n) = A078898(A249817(n)).
For semiprimes n = p_i * p_j, j >= i, a(n) = A000040(1+A243055(n)) = p_{1+j-i}.
a(n) = floor(A348717(n)/2). - Antti Karttunen, Apr 30 2022
If n has prime factorization Product_{i=1..k} prime(x_i), then a(n) = Product_{i=2..k} prime(x_i-x_1+1). The opposite version is A358195, prime indices A358172, even bisection A241916. - Gus Wiseman, Dec 29 2022

A348717 a(n) is the least k such that A003961^i(k) = n for some i >= 0 (where A003961^i denotes the i-th iterate of A003961).

Original entry on oeis.org

1, 2, 2, 4, 2, 6, 2, 8, 4, 10, 2, 12, 2, 14, 6, 16, 2, 18, 2, 20, 10, 22, 2, 24, 4, 26, 8, 28, 2, 30, 2, 32, 14, 34, 6, 36, 2, 38, 22, 40, 2, 42, 2, 44, 12, 46, 2, 48, 4, 50, 26, 52, 2, 54, 10, 56, 34, 58, 2, 60, 2, 62, 20, 64, 14, 66, 2, 68, 38, 70, 2, 72, 2
Offset: 1

Views

Author

Rémy Sigrist, Oct 31 2021

Keywords

Comments

All terms except a(1) = 1 are even.
To compute a(n) for n > 1:
- if n = Product_{j = 1..o} prime(p_j)^e_j (where prime(i) denotes the i-th prime number, p_1 < ... < p_o and e_1 > 0)
- then a(n) = Product_{j = 1..o} prime(p_j + 1 - p_1)^e_j.
This sequence has similarities with A304776: here we shift down prime indexes, there prime exponents.
Smallest number generated by uniformly decrementing the indices of the prime factors of n. Thus, for n > 1, the smallest m > 1 such that the first differences of the indices of the ordered prime factors (including repetitions) are the same for m and n. As a function, a(.) preserves properties such as prime signature. - Peter Munn, May 12 2022

Crossrefs

Positions of particular values (see formula section): A000040, A001248, A006094, A030078, A030514, A046301, A050997, A090076, A090090, A166329, A251720.
Also see formula section for the relationship to: A000265, A003961, A004277, A005940, A020639, A046523, A055396, A071364, A122111, A156552, A243055, A243074, A297845, A322993.
Sequences with comparable definitions: A304776, A316437.
Cf. A246277 (terms halved), A305897 (restricted growth sequence transform), A354185 (Möbius transform), A354186 (Dirichlet inverse), A354187 (sum with it).

Programs

  • Mathematica
    a[1] = 1; a[n_] := Module[{f = FactorInteger[n], d}, d = PrimePi[f[[1, 1]]] - 1; Times @@ ((Prime[PrimePi[#[[1]]] - d]^#[[2]]) & /@ f)]; Array[a, 100] (* Amiram Eldar, Oct 31 2021 *)
  • PARI
    a(n) = { my (f=factor(n)); if (#f~>0, my (pi1=primepi(f[1,1])); for (k=1, #f~, f[k,1] = prime(primepi(f[k,1])-pi1+1))); factorback(f) }

Formula

a(n) = n iff n belongs to A004277.
A003961^(A055396(n)-1)(a(n)) = n for any n > 1.
a(n) = 2 iff n belongs to A000040 (prime numbers).
a(n) = 4 iff n belongs to A001248 (squares of prime numbers).
a(n) = 6 iff n belongs to A006094 (products of two successive prime numbers).
a(n) = 8 iff n belongs to A030078 (cubes of prime numbers).
a(n) = 10 iff n belongs to A090076.
a(n) = 12 iff n belongs to A251720.
a(n) = 14 iff n belongs to A090090.
a(n) = 16 iff n belongs to A030514.
a(n) = 30 iff n belongs to A046301.
a(n) = 32 iff n belongs to A050997.
a(n) = 36 iff n belongs to A166329.
a(1) = 1, for n > 1, a(n) = 2*A246277(n). - Antti Karttunen, Feb 23 2022
a(n) = A122111(A243074(A122111(n))). - Peter Munn, Feb 23 2022
From Peter Munn and Antti Karttunen, May 12 2022: (Start)
a(1) = 1; a(2n) = 2n; a(A003961(n)) = a(n). [complete definition]
a(n) = A005940(1+A322993(n)) = A005940(1+A000265(A156552(n))).
Equivalently, A156552(a(n)) = A000265(A156552(n)).
A297845(a(n), A020639(n)) = n.
A046523(a(n)) = A046523(n).
A071364(a(n)) = A071364(n).
a(n) >= A071364(n).
A243055(a(n)) = A243055(n).
(End)

A340305 Numbers k such that k and the least number that is larger than k and has the same set of distinct prime divisors as k also has the same prime signature as k.

Original entry on oeis.org

12, 45, 60, 63, 84, 132, 156, 175, 204, 228, 275, 276, 315, 325, 348, 350, 372, 420, 425, 444, 475, 492, 495, 516, 525, 539, 540, 564, 575, 585, 636, 637, 660, 675, 693, 700, 708, 732, 765, 780, 804, 819, 833, 852, 855, 876, 924, 931, 948, 996, 1020, 1035, 1068
Offset: 1

Views

Author

Amiram Eldar, Jan 03 2021

Keywords

Comments

Numbers k such that k and A065642(k) have the same prime signature (A118914).

Examples

			12 is a term since the least number that is larger than 12 and has the same set of distinct prime divisors as 12, {2, 3}, is 18 = 2 * 3^2 which also has the same prime signature as 12.
		

Crossrefs

Subsequence: A251720.

Programs

  • Mathematica
    rad[n_] := Times @@ FactorInteger[n][[;; , 1]]; next[n_] := Module[{r = rad[n]}, SelectFirst[Range[n + 1, n^2], rad[#] == r &]]; sig[n_] := Sort @ FactorInteger[n][[;; , 2]]; Select[Range[2, 300], sig[#] == sig[next[#]] &]

A355446 Numbers of the form p^2 * q where p and q are primes with p < q < p^2.

Original entry on oeis.org

12, 45, 63, 175, 275, 325, 425, 475, 539, 575, 637, 833, 931, 1127, 1421, 1519, 1573, 1813, 2009, 2057, 2107, 2299, 2303, 2783, 2873, 3211, 3509, 3751, 3887, 4477, 4901, 4961, 5203, 5239, 5491, 5687, 6253, 6413, 6647, 6929, 7139, 7267, 7381, 7943, 8107, 8303, 8381, 8591, 8833, 8957, 8959, 9559, 9971, 10043, 10309, 10469
Offset: 1

Views

Author

Antti Karttunen, Jul 02 2022

Keywords

Comments

Numbers whose number of divisors of n (A000005) is equal to 3 + the number of prime factors of n (with multiplicity, A001222), and the fourth smallest divisor is a square of a prime (A001248).

Examples

			12 = 2^2 * 3 is included because 2 < 3, and of the divisors of 12, [1, 2, 3, 4, 6, 12], the fourth one (4) is a square of prime as 2^2 > 3.
		

Crossrefs

Setwise difference A096156 \ A355445.
Positions of 6's in A290110 and in A300250.
Subsequence of A066680, and of A355455.
A251720 is a subsequence.
Cf. A000005, A001222, A001248, A355444 (characteristic function).

Programs

  • Mathematica
    Select[Range[10^4], (f = FactorInteger[#])[[;; , 2]] == {2, 1} && f[[1, 1]]^2 > f[[2, 1]] &] (* Amiram Eldar, Jul 07 2022 *)
  • PARI
    A355444(n) = ((numdiv(n) == (3+bigomega(n))) && issquare(divisors(n)[4]));
    isA355446(n) = A355444(n);

A033477 Products p^3 or p^2*q, where {p,q} are consecutive primes.

Original entry on oeis.org

8, 12, 18, 27, 45, 75, 125, 175, 245, 343, 539, 847, 1331, 1573, 1859, 2197, 2873, 3757, 4913, 5491, 6137, 6859, 8303, 10051, 12167, 15341, 19343, 24389, 26071, 27869, 29791, 35557, 42439, 50653, 56129, 62197, 68921, 72283, 75809, 79507, 86903, 94987, 103823
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • Maple
    R:= NULL: p:= 2:
    for n from 1 to 30 do
      q:= nextprime(p);
      R:= R, p^3, p^2*q, p*q^2;
      p:= q;
    od:
    R; # Robert Israel, Jun 26 2020
  • Mathematica
    nn=50;With[{prs=Prime[Range[nn]]},Take[Union[Flatten[{prs^3,{#[[1]]^2 #[[2]],#[[2]]^2 #[[1]]}&/@Partition[prs,2,1]}]],nn]] (* Harvey P. Dale, Dec 28 2013 *)

Formula

From Robert Israel, Jun 26 2020: (Start)
a(3k) = A030078(k+1).
a(3k+1) = A251720(k+1).
a(3k+2) = a(3k+1)^2/a(3k). (End)

Extensions

Corrected and extended by Harvey P. Dale, Dec 28 2013

A384003 Irregular triangle T(n,k), n >= 0, 0 <= k < 2^(n-1), where T(n,k) = Product_{j=0..n-1} prime(j+1)^((n-j)*d_j), where d_j is the bit with digit weight 2^j in the binary expansion of 2^(n-1)+k.

Original entry on oeis.org

1, 2, 3, 12, 5, 40, 45, 360, 7, 112, 189, 3024, 175, 2800, 4725, 75600, 11, 352, 891, 28512, 1375, 44000, 111375, 3564000, 539, 17248, 43659, 1397088, 67375, 2156000, 5457375, 174636000, 13, 832, 3159, 202176, 8125, 520000, 1974375, 126360000, 4459, 285376, 1083537
Offset: 0

Views

Author

Michael De Vlieger and Peter Munn, May 28 2025

Keywords

Comments

This sequence can be seen as a structured ordering of numbers m that are not divisible by the square of their greatest prime factor and where every prime in the canonical factorization of m has the same sum of prime index and exponent. For example, prime(1)^3 * prime(3)^1 = 2^3 * 5 = 40. The ordering is lexicographic according to prime divisors listed in decreasing order, as used for A019565. Row n has the numbers whose greatest prime factor is prime(n).

Examples

			Table begins:
n\k  0    1    2     3    4     5     6       7
-----------------------------------------------
0:   1;
1:   2;
2:   3,  12;
3:   5,  40,  45,  360;
4:   7, 112, 189, 3024, 175, 2800, 4725, 75600;
     ...
Table showing prime power decomposition of a(n), where A067255(a(n)) represents prime(i)^j | a(n), with j in the i-th position, replacing 0 with "." for visibility:
 n     a(n)  A067255(a(n))
--------------------------
 0       1   .
 1       2   1
 2       3   .1
 3      12   21
 4       5   ..1
 5      40   3.1
 6      45   .21
 7     360   321
 8       7   ...1
 9     112   4..1
10     189   .3.1
11    3024   43.1
12     175   ..21
13    2800   4.21
14    4725   .321
15   75600   4321
		

Crossrefs

Programs

  • Mathematica
    f[x_] := If[x == 1, {0}, Function[g, ReplacePart[Table[0, {PrimePi[f[[-1, 1]] ]}], #] &@ Map[PrimePi@ First@ # -> Last@ # &, g]]@ FactorInteger@ x]; Table[f[Reverse@ Range[Length[#]]*#] &@ Reverse@ IntegerDigits[n, 2], {n, 0, 120}]

Formula

T(0,0) = 1; T(1,0) = 2.
Otherwise, T(n,2k) = A003961(T(n-1,k)).
T(n,2k+1) = T(n,2k)*2^n.
T(n,0) = prime(n).
T(n,2^(n-1)-1) = A006939(n).
T(n,2^(n-2)) = A251720(n).
Using a(m) to denote a term of the linear sequence with offset 0: (Start)
A019565(m) = A007947(a(m)).
a(m) = T(n,k) = gcd(A019565(m)^n, A006939(n)).
Equivalently, for p = A000040(i), the i-th prime, p|a(m) iff p|A019565(m), in which case A060175(m,i) = j - i + 1, where j = PrimePi(gpf(A019565(m))) = A061395(A019565(m)).
(End)
For n > 0, A071178(T(n,k)) = 1.

Extensions

Name edited by Peter Munn, Aug 30 2025
Showing 1-8 of 8 results.