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 21-30 of 1153 results. Next

A335876 a(1) = 2, and for n > 1, a(n) = n + (n/p), where p is largest prime dividing n, A006530(n).

Original entry on oeis.org

2, 3, 4, 6, 6, 8, 8, 12, 12, 12, 12, 16, 14, 16, 18, 24, 18, 24, 20, 24, 24, 24, 24, 32, 30, 28, 36, 32, 30, 36, 32, 48, 36, 36, 40, 48, 38, 40, 42, 48, 42, 48, 44, 48, 54, 48, 48, 64, 56, 60, 54, 56, 54, 72, 60, 64, 60, 60, 60, 72, 62, 64, 72, 96, 70, 72, 68, 72, 72, 80, 72, 96, 74, 76, 90, 80, 84, 84, 80, 96, 108, 84, 84
Offset: 1

Views

Author

Antti Karttunen, Jun 28 2020

Keywords

Crossrefs

Cf. A006530, A052126, A171462, A331410, A334097, A335431 (positions of two's powers > 2).

Programs

  • Mathematica
    Array[# (1 + 1/FactorInteger[#][[-1, 1]]) &, 83] (* Michael De Vlieger, Jul 08 2020 *)
  • PARI
    A335876(n) = if(1==n,2,n + (n/vecmax(factor(n)[, 1])));

Formula

a(n) = n + A052126(n).

A346635 Numbers whose division (or multiplication) by their greatest prime factor yields a perfect square. Numbers k such that k*A006530(k) is a perfect square.

Original entry on oeis.org

1, 2, 3, 5, 7, 8, 11, 12, 13, 17, 19, 20, 23, 27, 28, 29, 31, 32, 37, 41, 43, 44, 45, 47, 48, 52, 53, 59, 61, 63, 67, 68, 71, 73, 76, 79, 80, 83, 89, 92, 97, 99, 101, 103, 107, 108, 109, 112, 113, 116, 117, 124, 125, 127, 128, 131, 137, 139, 148, 149, 151, 153
Offset: 1

Views

Author

Gus Wiseman, Aug 10 2021

Keywords

Comments

This is the sorted version of A342768(n) = position of first appearance of n in A346701 (but A346703 works also).

Examples

			The terms together with their prime indices begin:
     1: {}          31: {11}            71: {20}
     2: {1}         32: {1,1,1,1,1}     73: {21}
     3: {2}         37: {12}            76: {1,1,8}
     5: {3}         41: {13}            79: {22}
     7: {4}         43: {14}            80: {1,1,1,1,3}
     8: {1,1,1}     44: {1,1,5}         83: {23}
    11: {5}         45: {2,2,3}         89: {24}
    12: {1,1,2}     47: {15}            92: {1,1,9}
    13: {6}         48: {1,1,1,1,2}     97: {25}
    17: {7}         52: {1,1,6}         99: {2,2,5}
    19: {8}         53: {16}           101: {26}
    20: {1,1,3}     59: {17}           103: {27}
    23: {9}         61: {18}           107: {28}
    27: {2,2,2}     63: {2,2,4}        108: {1,1,2,2,2}
    28: {1,1,4}     67: {19}           109: {29}
    29: {10}        68: {1,1,7}        112: {1,1,1,1,4}
		

Crossrefs

Removing 1 gives a subset of A026424.
The unsorted even version is A129597.
The unsorted version is A342768(n) = A342767(n,n).
Except the first term, the even version is 2*a(n).
A000290 lists squares.
A001221 counts distinct prime factors.
A001222 counts all prime factors.
A006530 gives the greatest prime factor.
A061395 gives the greatest prime index.
A027193 counts partitions of odd length.
A056239 adds up prime indices, row sums of A112798.
A209281 = odd bisection sum of standard compositions (even: A346633).
A316524 = alternating sum of prime indices (sign: A344617, rev.: A344616).
A325534 counts separable partitions, ranked by A335433.
A325535 counts inseparable partitions, ranked by A335448.
A344606 counts alternating permutations of prime indices.
A346697 = odd bisection sum of prime indices (weights of A346703).
A346699 = odd bisection sum of reversed prime indices (weights of A346701).

Programs

  • Maple
    filter:= proc(n) issqr(n/max(numtheory:-factorset(n))) end proc:
    filter(1):= true:
    select(filter, [$1..200]); # Robert Israel, Nov 26 2022
  • Mathematica
    sqrQ[n_]:=IntegerQ[Sqrt[n]];
    Select[Range[100],sqrQ[#*FactorInteger[#][[-1,1]]]&]
  • PARI
    isok(m) = (m==1) || issquare(m/vecmax(factor(m)[,1])); \\ Michel Marcus, Aug 12 2021

Formula

a(n) = A129597(n)/2 for n > 1.

A347242 Numbers k such that when iterating the map x -> A000593(x), at some point before 1 is reached (after starting from x=k), a term is encountered whose largest prime factor is at least as large as A006530(k).

Original entry on oeis.org

9, 18, 25, 27, 36, 45, 49, 50, 54, 55, 63, 72, 75, 81, 90, 98, 99, 100, 108, 110, 117, 121, 125, 126, 135, 144, 147, 150, 162, 165, 169, 175, 180, 196, 198, 200, 216, 220, 225, 234, 242, 243, 245, 250, 252, 270, 275, 288, 289, 294, 300, 315, 324, 325, 330, 338, 343, 350, 360, 361, 363, 375, 385, 392, 396, 400
Offset: 1

Views

Author

Antti Karttunen, Aug 28 2021

Keywords

Comments

Provided there do not exist any odd perfect numbers, these are numbers k for which A347240(k) >= A006530(k), as for any odd perfect number x, A347240(x) = -1 by its escape clause.
If k is included as a term, then 2*k is also present.
Not all odd squares of primes are present. For example, 67^2 and 79^2 are not included. See also A091490, which seems to be a subsequence of those exceptions.
Conjecture: There are no primes in this sequence. Checked up to the 2^20-th prime, 16290047.

Examples

			For n = 55 = 5*11, on the first iteration we get A000593(55) = 72 = 2^3 * 3^2, but both 2 and 3 are less than 11; therefore we iterate a second time to get A000593(72) = 13, which is the first value whose largest prime factor is larger than that of 55 (13 > 11), thus 55 is included in the sequence.
		

Crossrefs

Cf. A000593, A006530, A091490, A161942, A336353, A336361, A347240, A347241, A347243 (complement), A347244 (characteristic function).
Positions of nonzero terms in A347245.

Programs

A354512 Number of solutions m >= 2 to m - gpf(m) = n, gpf = A006530.

Original entry on oeis.org

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

Views

Author

Jianing Song, Aug 16 2022

Keywords

Comments

Number of primes p such that gpf(n+p) = p (such p must be prime factors of n).
Number of distinct prime factors p of n such that n+p is p-smooth.
Clearly we have a(n) <= omega(n) for all n, omega = A001221. The differences are given by A354527.
Is this sequence unbounded? Note that 4 does not appear until a(1660577).

Examples

			a(78) = 2 since the prime factors of 78 are 2,3,13, and we have gpf(78+3) = 3 and gpf(78+13) = 13, so the solutions to m - gpf(m) = 78 are m = 78+3 = 81 or m = 78+13 = 91. Note that gpf(78+2) != 2.
a(12) = 0 since the prime factors of 12 are 2,3, and we have gpf(12+2) != 2 and gpf(12+3) != 3.
		

Crossrefs

Cf. A006530, A076563, A001221, A354516 (indices of first occurrence of each number), A354527.
Cf. A354514 (0 together with indices of positive terms), A354515 (indices of 0), A354516, A354525 (indices n for which a(n) reaches omega(n)), A354526 (indices n for which a(n) is smaller than omega(n)).

Programs

  • PARI
    gpf(n) = vecmax(factor(n)[, 1]);
    a(n) = my(f=factor(n)[, 1]); sum(i=1, #f, gpf(n+f[i])==f[i])

A064920 a(n) = n/gpf(n) + gpf(n) - 1, where gpf = A006530 = greatest prime factor.

Original entry on oeis.org

2, 3, 3, 5, 4, 7, 5, 5, 6, 11, 6, 13, 8, 7, 9, 17, 8, 19, 8, 9, 12, 23, 10, 9, 14, 11, 10, 29, 10, 31, 17, 13, 18, 11, 14, 37, 20, 15, 12, 41, 12, 43, 14, 13, 24, 47, 18, 13, 14, 19, 16, 53, 20, 15, 14, 21, 30, 59, 16, 61, 32, 15, 33, 17, 16, 67, 20, 25, 16, 71, 26, 73, 38, 19, 22
Offset: 2

Views

Author

Reinhard Zumkeller, Oct 14 2001

Keywords

Comments

a(n) = A052126(n) + A006530(n) - 1; a(n) <= n and for n > 1: a(n) = n iff n is prime.

Examples

			a(18) = 18/2 + 2 - 1 = 10;
a(19) = 19/19 + 19 - 1 = 19.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := (g = FactorInteger[n][[-1, 1]]; n/g + g - 1); a /@ Range[2, 76] (* Jean-François Alcover, Apr 06 2011 *)
  • PARI
    gpf(n)= { local(f); f=factor(n)~; return(f[1, length(f)]) } { for (n=2, 1000, g=gpf(n); a=n / g + g - 1; write("b064920.txt", n, " ", a) ) } \\ Harry J. Smith, Sep 29 2009
    
  • PARI
    a(n) = my(p = vecmax(factor(n)[,1])); n/p + p - 1; \\ Michel Marcus, Jun 19 2018

A076272 Largest prime factor of A076271(n): A006530(A076271(n)).

Original entry on oeis.org

1, 2, 2, 3, 3, 3, 5, 5, 5, 5, 7, 7, 7, 7, 7, 7, 11, 11, 11, 11, 11, 11, 13, 13, 13, 13, 13, 13, 17, 17, 17, 17, 17, 17, 19, 19, 19, 19, 19, 19, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 29, 29, 29, 29, 29, 29, 29, 29, 31, 31, 31, 31, 31, 31, 31, 31, 37, 37, 37, 37, 37, 37, 37, 37
Offset: 1

Views

Author

Reinhard Zumkeller, Oct 04 2002

Keywords

Crossrefs

See A180101 for a variant.

Programs

  • Mathematica
    Differences[NestList[#+FactorInteger[#][[-1,1]]&,1,100]] (* Paolo Xausa, Dec 09 2023 *)

Formula

a(n) = A076271(n+1) - A076271(n) for all n;
a(A076273(k)+j) = A008578(k) for k>0 and 0 <= j < A075527(k-1).

A242420 Self-inverse permutation of positive integers: a(n) = (A006530(n)^(A071178(n)-1)) * A243057(n).

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 15, 11, 12, 13, 35, 10, 16, 17, 18, 19, 45, 21, 77, 23, 24, 25, 143, 27, 175, 29, 30, 31, 32, 55, 221, 14, 36, 37, 323, 91, 135, 41, 105, 43, 539, 20, 437, 47, 48, 49, 75, 187, 1573, 53, 54, 33, 875, 247, 667, 59, 90, 61, 899, 63, 64, 65
Offset: 1

Views

Author

Antti Karttunen, May 31 2014

Keywords

Comments

This self-inverse permutation (involution) of positive integers preserves both the total number of prime divisors and the (index of) largest prime factor of n, i.e., for all n it holds that A001222(a(n)) = A001222(n) and A006530(a(n)) = A006530(n) [equally: A061395(a(n)) = A061395(n)].
It also preserves the exponent of the largest prime factor (A071178), from which follows that the sequence A102750 is closed with respect to this permutation, i.e., for all n in A102750, a(n) is either same n or some other term of A102750.
Considered as an operation on partitions encoded by the indices of primes in the prime factorization of n (as in table A112798), this implements a self-inverse bijection which is a composition of the effects of A242419 and A225891. (Or equally: A105119 and A242419). For details, please see the respective Comments sections and/or Example section of this entry.

Examples

			For n = 2200, we see that it encodes the partition (1,1,1,3,3,5) in A112798 as 2200 = p_1 * p_1 * p_1 * p_3 * p_3 * p_5 = 2^3 * 5^2 * 11. This in turn corresponds to the following Young diagram in French notation:
   _
  | |
  | |
  | |_ _
  |     |
  |     |_ _
  |_ _ _ _ _|
First we apply A242419, which reverses the order of "steps", so that each horizontal and vertical line segment centered around a "convex corner" moves as a whole, so that the first stair from the top (one unit wide and three units high) is moved to the last position, the second one (two units wide and two units high) stays in the middle, and the original bottom step (two units wide and one unit high) will be the new topmost step, thus we get the following Young diagram:
   _ _
  |   |_ _
  |       |
  |       |_
  |         |
  |         |
  |_ _ _ _ _|
which represents the partition (2,4,4,5,5,5), encoded in A112798 by p_2 * p_4^2 * p_5^3 = 3 * 7^2 * 11^3 = 195657.
Then we apply A225891, which rotates the exponents of distinct primes in the factorization of n one left, in this context the vertical line segments one step up, with the top-one going to the bottomost, and so we get:
   _ _
  |   |
  |   |_ _
  |       |
  |       |
  |       |_
  |_ _ _ _ _|
which represents the partition (2,2,4,4,4,5), encoded in A112798 by p_2^2 * p_4^3 * p_5 = 3^2 * 7^3 * 11 = 33957, thus a(2200) = 33957.
		

Crossrefs

Programs

Formula

a(n) = (A006530(n)^(A071178(n)-1)) * A243057(n).
For all k in A102750, a(k) = A243057(k) = A243059(k).
By composing related permutations:
a(n) = A225891(A242419(n)) = A242419(A105119(n)).

A339466 Primes p such that gpf((p - 1)/gpf(p - 1)) > 3, where gpf(m) is the greatest prime factor of m, A006530.

Original entry on oeis.org

71, 101, 131, 151, 191, 197, 211, 239, 251, 281, 311, 331, 401, 419, 421, 431, 443, 461, 463, 491, 521, 547, 571, 599, 601, 617, 631, 647, 659, 661, 677, 683, 691, 701, 727, 743, 751, 761, 821, 827, 859, 881, 883, 911, 941, 947, 953, 967, 971, 991, 1013, 1021
Offset: 1

Views

Author

Bernard Schott, Dec 10 2020

Keywords

Comments

Paul Erdős asked if there are infinitely many primes p such that (p-1)/gpf(p-1) = 2^k or = 2^q * 3^r (see Richard K. Guy reference). This sequence lists the primes p that do not satisfy these two previous relations.
Replacing in the definition gpf by lpf (A020639) leads to A122259. In fact this sequence is a subsequence of A122259. - Peter Luschny, Dec 13 2020

Examples

			71 is prime, 70/7 = 10 = 2*5 hence 71 is a term.
101 is prime, 100/5 = 20 = 2^2*5 hence 101 is a term.
151 is prime, 150/5 = 30 = 2*3*5 hence 151 is a term.
The first few quotients obtained are: 10, 20, 10, 30, 10, 28, 30, 14, 50, 40, ...
		

References

  • Richard K. Guy, Unsolved Problems in Number Theory, 3rd Edition, Springer, 2004, Section B46, p. 154.

Crossrefs

Cf. A074781 (ratio=2^k), A339465 (ratio=2^q*3^r), A339463 (ratio=2^q*5^r).
Cf. A122259.

Programs

  • Magma
    s:=func; [p:p in PrimesInInterval(3,1100)|( not 3 in PrimeDivisors(a) and #PrimeDivisors(a) ge 2) or ( 3 in PrimeDivisors(a) and #PrimeDivisors(a) ge 3) where a is (p-1) div s(p-1)]; // Marius A. Burtea, Dec 10 2020
    
  • Maple
    alias(pf = NumberTheory:-PrimeFactors): gpf := n -> max(pf(n)):
    is_a := n -> isprime(n) and gpf((n-1)/gpf(n-1)) > 3:
    select(is_a, [$5..1021]); # Peter Luschny, Dec 13 2020
  • Mathematica
    q[n_] := Module[{f = FactorInteger[n - 1]}, (Length[f] == 1 && f[[1, 1]] == 2) || (Length[f] == 2 && f[[1, 1]] == 2 && f[[2, 2]] == 1) || (Length[f] == 2 && f[[2, 1]] == 3 && f[[2, 2]] > 1) || (Length[f] == 3 && f[[2, 1]] == 3 && f[[3, 2]] == 1)]; Select[Range[3, 1000], PrimeQ[#] && ! q[#] &] (* Amiram Eldar, Dec 10 2020 *)
  • PARI
    is(n) = {if(!isprime(n) || n==2, return(0)); my(pm1 = n-1, f = factor(pm1)[,1]); (pm1 /= (f[#f]*1<1} \\ David A. Corneth, Dec 13 2020

Extensions

More terms from Amiram Eldar, Dec 11 2020

A341628 Square array A(n,k) = A006530(A341527(A246278(n,k))), read by falling antidiagonals.

Original entry on oeis.org

3, 7, 5, 5, 13, 7, 3, 7, 31, 11, 7, 5, 11, 11, 13, 7, 11, 13, 13, 19, 17, 11, 13, 13, 11, 17, 61, 19, 31, 13, 31, 17, 61, 19, 307, 23, 13, 11, 17, 13, 19, 17, 23, 127, 29, 7, 31, 71, 19, 19, 23, 29, 29, 79, 31, 13, 13, 11, 2801, 23, 61, 29, 181, 31, 67, 37, 5, 17, 31, 19, 3221, 29, 307, 31, 53, 37, 331, 41
Offset: 1

Views

Author

Antti Karttunen, Feb 16 2021

Keywords

Examples

			The top left corner of the array:
   n=   1     2   3     4   5     6   7        8     9    10  11    12  13    14
  2n=   2     4   6     8  10    12  14       16    18    20  22    24  26    28
-----+---------------------------------------------------------------------------
   1 |  3,    7,  5,    3,  7,    7, 11,      31,   13,    7, 13,    5, 17,   11,
   2 |  5,   13,  7,    5, 11,   13, 13,      11,   31,   13, 17,    7, 19,   13,
   3 |  7,   31, 11,   13, 13,   31, 17,      71,   11,   31, 19,   13, 23,   31,
   4 | 11,   11, 13,   11, 17,   13, 19,    2801,   19,   17, 23,   13, 29,   19,
   5 | 13,   19, 17,   61, 19,   19, 23,    3221,   61,   19, 29,   61, 31,   23,
   6 | 17,   61, 19,   17, 23,   61, 29,   30941,  307,   61, 31,   19, 37,   61,
   7 | 19,  307, 23,   29, 29,  307, 31,   88741,  127,  307, 37,   29, 41,  307,
   8 | 23,  127, 29,  181, 31,  127, 37,     911,   79,  127, 41,  181, 43,  127,
   9 | 29,   79, 31,   53, 37,   79, 41,  292561,   67,   79, 43,   53, 47,   79,
  10 | 31,   67, 37,  421, 41,   67, 43,  732541,  331,   67, 47,  421, 53,   67,
  11 | 37,  331, 41,   37, 43,  331, 47,   17351,   67,  331, 53,   41, 59,  331,
  12 | 41,   67, 43,  137, 47,   67, 53,    4271, 1723,   67, 59,  137, 61,   67,
  13 | 43, 1723, 47,   43, 53, 1723, 59,  579281,  631, 1723, 61,   47, 67, 1723,
  14 | 47,  631, 53,   47, 59,  631, 61, 3500201,   61,  631, 67,   53, 71,  631,
  15 | 53,   61, 59,   53, 61,   61, 67,   14621,  409,   61, 71,   59, 73,   67,
  16 | 59,  409, 61,  281, 67,  409, 71,    5581, 3541,  409, 73,  281, 79,  409,
  17 | 61, 3541, 67, 1741, 71, 3541, 73,     181,   97, 3541, 79, 1741, 83, 3541,
  18 | 67,   97, 71, 1861, 73,   97, 79,   21491,   71,   97, 83, 1861, 89,   97,
  19 | 71,   71, 73,  449, 79,   73, 83,   26881, 5113,   79, 89,  449, 97,   83,
		

Crossrefs

Programs

  • PARI
    up_to = 105;
    A003961(n) = { my(f=factor(n)); for (i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); factorback(f); }; \\ From A003961
    A006530(n) = if(n>1, vecmax(factor(n)[, 1]), 1);
    A341528(n) = (n*sigma(A003961(n)));
    A341529(n) = (sigma(n)*A003961(n));
    A341527(n) = denominator(A341528(n) / A341529(n));
    A246278sq(row,col) = if(1==row,2*col, my(f = factor(2*col)); for(i=1, #f~, f[i,1] = prime(primepi(f[i,1])+(row-1))); factorback(f));
    A341628sq(row,col) = A006530(A341527(A246278sq(row,col)));
    A341628list(up_to) = { my(v = vector(up_to), i=0); for(a=1,oo, for(col=1,a, i++; if(i > up_to, return(v)); v[i] = A341628sq(col,(a-(col-1))))); (v); };
    v341628 = A341628list(up_to);
    A341628(n) = v341628[n];

Formula

A(n,k) = A006530(A341627(n,k)) = A006530(A341527(A246278(n,k))).

A347241 a(1) = 1, and for n > 1, a(n) is the largest prime factor (A006530) of all terms encountered when iterating the map x -> A000593(x), when starting from x = n, and including the n itself. If 1 is never reached when starting from n, then a(n) = -1.

Original entry on oeis.org

1, 2, 3, 2, 5, 3, 7, 2, 13, 5, 11, 3, 13, 7, 5, 2, 17, 13, 19, 5, 7, 11, 23, 3, 31, 13, 5, 7, 29, 5, 31, 2, 11, 17, 7, 13, 37, 19, 13, 5, 41, 7, 43, 11, 13, 23, 47, 3, 19, 31, 17, 13, 53, 5, 13, 7, 19, 29, 59, 5, 61, 31, 13, 2, 13, 11, 67, 17, 23, 7, 71, 13, 73, 37, 31, 19, 11, 13, 79, 5, 19, 41, 83, 7, 17, 43, 29
Offset: 1

Views

Author

Antti Karttunen, Aug 28 2021

Keywords

Examples

			For n = 17, the iteration proceeds as follows 17 -> 18 (= 2*3*3), 18 -> 13 (13 is a prime), 13 -> 14 (= 2*7), 14 -> 8 (= 2*2*2), 8 -> 1. The largest prime factor present (when including the starting term also) is 17, thus a(17) = 17.
		

Crossrefs

Programs

Formula

a(n) = max(A006530(n), A347240(n)).
Previous Showing 21-30 of 1153 results. Next