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-10 of 29 results. Next

A386246 Composite numbers k such that A075254(k) is a square.

Original entry on oeis.org

27, 108, 171, 240, 456, 603, 744, 936, 988, 1424, 1702, 1737, 1820, 1899, 1904, 1989, 2166, 2261, 2366, 2817, 2873, 3283, 3553, 3681, 3728, 3784, 3852, 3894, 4266, 4437, 4700, 4923, 4975, 5005, 5008, 5073, 5117, 5193, 5278, 5356, 5418, 5820, 6050, 6486, 6576, 6627, 6651, 6775, 7947, 8250, 9116
Offset: 1

Views

Author

Will Gosnell and Robert Israel, Jul 16 2025

Keywords

Comments

Composite numbers k such that k + sopfr(k) is a square, where sopfr(k) is the sum of prime factors of k with multiplicity.
Contains no semiprimes.
Includes 9*p if p is a prime of the form (x^2-6)/10 where x == 4 or 6 (mod 10).
Is this sequence disjoint from A386245?

Examples

			a(3) = 171 is a term because 171 = 3^2 * 19 is composite and 171 + 3 + 3 + 19 = 196 = 14^2 is a square.
		

Crossrefs

Programs

  • Maple
    filter:= proc(n) local t;
     if isprime(n) then return false fi;
     issqr(n + add(t[1]*t[2], t=ifactors(n)[2]))
    end proc:
    select(filter, [$4..10000]);

A346377 a(n) is the number of solutions k to A075254(k) = n.

Original entry on oeis.org

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

Views

Author

J. M. Bergot and Robert Israel, Jul 14 2021

Keywords

Comments

a(n) is the number of k such that k + A001414(k) = n.

Examples

			a(14) = 2 because there are two solutions to A075254(k) = 14, namely
A075254(7) = 7+7 = 14
A075254(8) = 8+2+2+2 = 14
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local t; add(t[1]*t[2],t=ifactors(n)[2])+n end proc:
    N:= 100: # for a(1)..a(N)
    V:= Vector(N):
    for n from 1 to N do
      v:= f(n);
      if v <= N then V[v]:= V[v]+1 fi
    od:
    convert(V[1..N],list);
  • Mathematica
    f[1] = 1; f[n_] := n + Plus @@ Times @@@ FactorInteger[n]; m = 100; v = Table[0, {m}]; Do[i = f[n]; If[i <= m, v[[i]]++], {n, 1, m}]; v (* Amiram Eldar, Jul 14 2021 *)

A346378 a(n) is the least k such that there are exactly n numbers i with A075254(i) = k.

Original entry on oeis.org

2, 1, 14, 59, 143, 239, 1079, 2519, 1439, 7559, 17639, 4319, 14399, 70559, 55439, 113399, 120959, 166319, 205919, 332639, 760319, 554399, 907199, 277199, 720719, 2162159, 3245759, 4324319, 2494799, 5266799, 5765759, 9172799, 8315999, 15724799, 16853759, 21067199
Offset: 0

Views

Author

J. M. Bergot and Robert Israel, Jul 14 2021

Keywords

Comments

a(n) is the least solution k to A346377(k) = n.

Examples

			a(3) = 59 because there are 3 solutions to A075254(k) = 59, namely
  A075254(38) = 38+2+19 = 59
  A075254(44) = 44+2+2+11 = 59
  A075254(48) = 48+2+2+2+2+3 = 59
and no number < 59 has exactly 3 solutions.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local t; add(t[1]*t[2],t=ifactors(n)[2])+n end proc:
    N:= 10^6: # for terms <= N
    V:= Vector(N):
    for n from 1 to N do
      v:= f(n);
      if v <= N then V[v]:= V[v]+1 fi
    od:
    m:= max(V):
    A:= Array(0..m):
    for i from 1 to N do
      if A[V[i]] = 0 then A[V[i]]:= i fi
    od:
    convert(A,list);
  • Mathematica
    f[1] = 1; f[n_] := n + Plus @@ Times @@@ FactorInteger[n]; m = 10^7; v = Table[0, {m}]; Do[i = f[n]; If[i <= m, v[[i]]++], {n, 1, m}]; TakeWhile[Table[ FirstPosition[v, k][[1]], {k, 0, Max[v]}], NumericQ] (* Amiram Eldar, Jul 14 2021 *)

A379721 Numbers whose prime indices have sum <= product.

Original entry on oeis.org

1, 2, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 30, 31, 33, 35, 37, 39, 41, 42, 43, 45, 47, 49, 50, 51, 53, 54, 55, 57, 59, 61, 63, 65, 66, 67, 69, 70, 71, 73, 75, 77, 78, 79, 81, 83, 84, 85, 87, 89, 90, 91, 93, 95, 97, 98, 99, 100, 101, 102, 103
Offset: 1

Views

Author

Gus Wiseman, Jan 05 2025

Keywords

Comments

A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798.
Partitions of this type are counted by A319005.
The complement is A325038.

Examples

			The terms together with their prime indices begin:
    1: {}
    2: {1}
    3: {2}
    5: {3}
    7: {4}
    9: {2,2}
   11: {5}
   13: {6}
   15: {2,3}
   17: {7}
   19: {8}
   21: {2,4}
   23: {9}
   25: {3,3}
   27: {2,2,2}
   29: {10}
   30: {1,2,3}
		

Crossrefs

The case of equality is A301987, inequality A325037.
Nonpositive positions in A325036.
A000040 lists the primes, differences A001223.
A055396 gives least prime index, greatest A061395.
A056239 adds up prime indices, row sums of A112798, counted by A001222.
A379681 gives sum plus product of prime indices, firsts A379682.
Counting and ranking multisets by comparing sum and product:
- same: A001055 (strict A045778), ranks A301987
- divisible: A057567, ranks A326155
- divisor: A057568, ranks A326149, see A326156, A326172, A379733
- greater: A096276 shifted right, ranks A325038
- greater or equal: A096276, ranks A325044
- less: A114324, ranks A325037, see A318029
- less or equal: A319005, ranks A379721 (this)
- different: A379736, ranks A379722, see A111133

Programs

  • Mathematica
    prix[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Select[Range[100],Total[prix[#]]<=Times@@prix[#]&]

Formula

Number k such that A056239(k) <= A003963(k).

A050703 Numbers that when added to the sum of their prime factors (with multiplicity) become prime.

Original entry on oeis.org

6, 10, 12, 14, 15, 20, 21, 26, 33, 34, 35, 38, 44, 46, 48, 51, 55, 57, 58, 65, 68, 74, 85, 86, 90, 93, 96, 111, 112, 116, 118, 123, 135, 141, 143, 145, 155, 158, 161, 166, 177, 178, 185, 188, 194, 201, 203, 205, 206, 208, 209, 210, 212, 215, 221, 224, 225, 252
Offset: 1

Views

Author

Patrick De Geest, Aug 15 1999

Keywords

Comments

No term of this sequence can be prime, since for a prime p, A075254(p)=2*p, hence not prime. - Michel Marcus, Jul 24 2015
From Robert Israel, Jul 24 2015: (Start)
Similarly, no term of the sequence can be a prime power.
Contains 2*n for n in A023208 and 3*n for n in A023213. (End)

Examples

			252 = 2*2*3*3*7; 252 + (2 + 2 + 3 + 3 + 7) = 252 + 17 = 269, which is prime.
		

Crossrefs

Programs

  • Maple
    filter:= n ->isprime(convert(map(convert,ifactors(n)[2],`*`),`+`)+n):
    select(filter, [$1..1000]); # Robert Israel, Jul 24 2015
  • Mathematica
    upto=300;Rest[Select[Complement[Range[upto], Prime[Range[ PrimePi[upto]]]], PrimeQ[#+ Total[Times@@@FactorInteger[#]]]&]] (* Harvey P. Dale, Apr 20 2011 *)
    Select[Range[500], PrimeQ[# + Total [Times @@@ FactorInteger[#]] && PrimeOmega[#] > 1] &]  (* K. D. Bajpai, Sep 12 2014 *)
  • PARI
    sopfr(n)=my(f=factor(n));sum(i=1,#f[,1],f[i,1]*f[i,2])
    is(n)=!isprime(n)&&isprime(n+sopfr(n)) \\ Charles R Greathouse IV, Jul 19 2011

Formula

{n: A075254(n) in A000040}. - R. J. Mathar, Jul 27 2015

Extensions

Name clarified by Michel Marcus, Jul 24 2015

A046022 Primes together with 1 and 4.

Original entry on oeis.org

1, 2, 3, 4, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269
Offset: 1

Views

Author

Keywords

Comments

Also the numbers which are incrementally largest values of A002034. - validated by Franklin T. Adams-Watters, Jul 13 2012
Solutions to A000005(x) + A000010(x) - x - 1 = 0. - Labos Elemer, Aug 23 2001
Also numbers m such that m, phi(m) and tau(m) form an integer triangle, where phi=A000010 is the totient and tau=A000005 the number of divisors (see also A084820). - Reinhard Zumkeller, Jun 04 2003
Terms > 1 are n such that n does not divide (n-1)!. - Benoit Cloitre, Nov 12 2003
Terms > 1 are the sum of their prime factors; 4 (= 2+2) is the only such composite number. - Stuart Orford (sjorford(AT)yahoo.co.uk), Aug 04 2005
From Jonathan Vos Post, Aug 23 2010, Robert G. Wilson v, Aug 25 2010, proof by D. S. McNeil, Aug 29 2010: (Start)
Also the numbers n which divide A001414(n), or equivalently divide A075254(n). Proof:
Theorem: for a multiset of m >= 2 integers a_i, each a_i >= 2, Product_{i=1..m} a_i >= Sum_{i=1..m} a_i, with equality only at (a_1,a_2) = (2,2).
Lemma: For integers x,y >= 2, if x > 2 or y > 2, x*y > x + y. This follows from distributing (x-1)*(y-1) > 1.
[Proof of the theorem by induction on m:
first consider m=2. We have equality at (2,2) and for any product(a_i) > 4 there is some a_i > 2, so the lemma gives a_1*a_2 > a_1+a_2.
Then the induction m->m+1: Product_{i=1..m+1} a_i = a_(m+1)*Product_{i=1..m} a_i >= a_(m+1) * Sum_{i=1..m} a_i.
Since a_(m+1) >= 2 and the sum >= 4, the lemma applies, and we find a_(m+1) * Sum+{i=1..m} a_i > a_(m+1) + Sum_{i=1..m} a_i = Sum_{i=1..m+1} a_i and thus Product_{i=1..m+1} a_i > Sum_{i=1..m+1} a_i, QED.]
For composite n > 4, applying the theorem to the multiset of prime factors with multiplicity yields n > sopfr(n), so there are no composite numbers greater than 4 such that they divide sopfr(n).
(End)
Numbers k such that the k-th Fibonacci number is relatively prime to all smaller Fibonacci numbers. - Charles R Greathouse IV, Jul 13 2012
Numbers k such that (-1)^k*floor(d(k)*(-1)^k/2) = 1, where d(k) is the number of divisors of k. - Wesley Ivan Hurt, Oct 11 2013
Also, union of odd primes (A065091) and the divisors of 4. Also, union of A008578 and 4. - Omar E. Pol, Nov 04 2013
Numbers k such that sigma(k!) is divisible by sigma((k-1)!). - Altug Alkan, Jul 18 2016

Crossrefs

Programs

  • Haskell
    a046022 n = a046022_list !! (n-1)
    a046022_list = [1..4] ++ drop 2 a000040_list
    -- Reinhard Zumkeller, Apr 06 2014
    
  • Maple
    A046022:=n-> `if`((-1)^n*floor(numtheory[tau](n)*(-1)^n/2) = 1, n, NULL); seq(A046022(j), j=1..260); # Wesley Ivan Hurt, Oct 11 2013
  • Mathematica
    max = 0; a = {}; Do[m = FactorInteger[n]; w = Sum[m[[k]][[1]]*m[[k]][[2]], {k, 1, Length[m]}]; If[w > max, AppendTo[a, w]; max = w], {n, 1, 1000}]; a (* Artur Jasinski, Apr 06 2008 *)
  • PARI
    a(n)=if(n<6,n,prime(n-2)) \\ Charles R Greathouse IV, Apr 28 2015
    
  • Python
    from sympy import prime
    def A046022(n): return prime(n-2) if n>4 else n # Chai Wah Wu, Oct 17 2024

Formula

A141295(a(n)) = a(n). - Reinhard Zumkeller, Jun 23 2008
A018194(a(n)) = 1. - Reinhard Zumkeller, Mar 09 2012
A240471(a(n)) = 1. - Reinhard Zumkeller, Apr 06 2014

Extensions

Better description from Frank Ellermann, Jun 15 2001

A075255 a(n) = n - (sum of prime factors of n (with repetition)).

Original entry on oeis.org

1, 0, 0, 0, 0, 1, 0, 2, 3, 3, 0, 5, 0, 5, 7, 8, 0, 10, 0, 11, 11, 9, 0, 15, 15, 11, 18, 17, 0, 20, 0, 22, 19, 15, 23, 26, 0, 17, 23, 29, 0, 30, 0, 29, 34, 21, 0, 37, 35, 38, 31, 35, 0, 43, 39, 43, 35, 27, 0, 48, 0, 29, 50, 52, 47, 50, 0, 47, 43, 56, 0, 60, 0, 35, 62, 53, 59, 60
Offset: 1

Views

Author

Zak Seidov, Sep 10 2002

Keywords

Examples

			a(6) = 1 because 6 = 2 * 3, sopfr(6) = 2 + 3 = 5 and 6 - 5 = 1.
		

Crossrefs

Cf. A145834 (= 0 followed by the nonzero terms of this sequence). - M. F. Hasler, Oct 31 2008

Programs

  • Magma
    [n eq 1 select 1 else n-(&+[p[1]*p[2]: p in Factorization(n)]): n in [1..80]]; // G. C. Greubel, Jan 11 2019
    
  • Maple
    a:= n-> n-add(i[1]*i[2], i=ifactors(n)[2]):
    seq(a(n), n=1..100);  # Alois P. Heinz, Aug 07 2015
  • Mathematica
    Join[{1}, Table[n - Total[Times@@@FactorInteger[n]], {n, 2, 80}]] (* Harvey P. Dale, Sep 20 2011 *)
  • PARI
    A075255(n)=n-sum(i=1,#n=factor(n)~,n[1,i]*n[2,i]) \\ M. F. Hasler, Oct 31 2008
    
  • Python
    from sympy import factorint
    def A075255(n): return n - sum(factorint(n,multiple=True)) # Chai Wah Wu, May 19 2022
  • Sage
    [n - sum(factor(n)[j][0]*factor(n)[j][1] for j in range(0, len(factor(n)))) for n in range(1, 80)] # G. C. Greubel, Jan 11 2019
    

Formula

a(n) = n - A001414(n).
a(n) = 0 if n is prime or if n = 4. - Alonso del Arte, Jul 31 2018

A379722 Numbers whose prime indices do not have the same sum as product.

Original entry on oeis.org

1, 4, 6, 8, 10, 12, 14, 15, 16, 18, 20, 21, 22, 24, 25, 26, 27, 28, 32, 33, 34, 35, 36, 38, 39, 40, 42, 44, 45, 46, 48, 49, 50, 51, 52, 54, 55, 56, 57, 58, 60, 62, 63, 64, 65, 66, 68, 69, 70, 72, 74, 75, 76, 77, 78, 80, 81, 82, 85, 86, 87, 88, 90, 91, 92, 93
Offset: 1

Views

Author

Gus Wiseman, Jan 08 2025

Keywords

Comments

A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798.
Partitions of this type are counted by A379736.
The complement is A301987, counted by A001055.

Examples

			The terms together with their prime indices begin:
    1: {}
    4: {1,1}
    6: {1,2}
    8: {1,1,1}
   10: {1,3}
   12: {1,1,2}
   14: {1,4}
   15: {2,3}
   16: {1,1,1,1}
   18: {1,2,2}
   20: {1,1,3}
   21: {2,4}
   22: {1,5}
   24: {1,1,1,2}
   25: {3,3}
   26: {1,6}
   27: {2,2,2}
   28: {1,1,4}
   32: {1,1,1,1,1}
		

Crossrefs

Nonzeros of A325036.
A000040 lists the primes, differences A001223.
A055396 gives least prime index, greatest A061395.
A056239 adds up prime indices, row sums of A112798, counted by A001222.
A324851 finds numbers > 1 divisible by the sum of their prime indices.
A379666 counts partitions by sum and product, without 1's A379668.
A379681 gives sum plus product of prime indices, firsts A379682.
Counting and ranking multisets by comparing sum and product:
- same: A001055 (strict A045778), ranks A301987
- divisible: A057567, ranks A326155
- divisor: A057568, ranks A326149, see A379733
- greater: A096276 shifted right, ranks A325038
- greater or equal: A096276, ranks A325044
- less: A114324, ranks A325037, see A318029
- less or equal: A319005, ranks A379721
- different: A379736, ranks A379722 (this)

Programs

  • Mathematica
    prix[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Select[Range[100],Times@@prix[#]!=Total[prix[#]]&]

A380955 Sum of prime indices of n (with multiplicity) minus sum of distinct prime indices of n.

Original entry on oeis.org

0, 0, 0, 1, 0, 0, 0, 2, 2, 0, 0, 1, 0, 0, 0, 3, 0, 2, 0, 1, 0, 0, 0, 2, 3, 0, 4, 1, 0, 0, 0, 4, 0, 0, 0, 3, 0, 0, 0, 2, 0, 0, 0, 1, 2, 0, 0, 3, 4, 3, 0, 1, 0, 4, 0, 2, 0, 0, 0, 1, 0, 0, 2, 5, 0, 0, 0, 1, 0, 0, 0, 4, 0, 0, 3, 1, 0, 0, 0, 3, 6, 0, 0, 1, 0, 0, 0
Offset: 1

Views

Author

Gus Wiseman, Feb 11 2025

Keywords

Comments

A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798.

Examples

			The prime indices of 96 are {1,1,1,1,1,2}, with sum 7, and with distinct prime indices {1,2}, with sum 3, so a(96) = 7 - 3 = 4.
		

Crossrefs

Positions of 0's are A005117, complement A013929.
For length instead of sum we have A046660.
Positions of 1's are A081770.
For factors instead of indices we have A280292, firsts A280286 (sorted A381075).
A multiplicative version is A290106.
Counting partitions by this statistic gives A364916.
Dominates A374248.
Positions of first appearances are A380956, sorted A380957.
For prime multiplicities instead of prime indices we have A380958.
For product instead of sum we have A380986.
A000040 lists the primes, differences A001223.
A055396 gives least prime index, greatest A061395.
A056239 adds up prime indices, row sums of A112798, length A001222.
A304038 lists distinct prime indices, sum A066328, length A001221.

Programs

  • Mathematica
    prix[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Table[Total[prix[n]]-Total[Union[prix[n]]],{n,100}]

Formula

a(n) = A056239(n) - A066328(n).
Additive: a(m*n) = a(m) + a(n) if gcd(m,n) = 1.

A379681 Sum plus product of the multiset of prime indices of n.

Original entry on oeis.org

1, 2, 4, 3, 6, 5, 8, 4, 8, 7, 10, 6, 12, 9, 11, 5, 14, 9, 16, 8, 14, 11, 18, 7, 15, 13, 14, 10, 20, 12, 22, 6, 17, 15, 19, 10, 24, 17, 20, 9, 26, 15, 28, 12, 19, 19, 30, 8, 24, 16, 23, 14, 32, 15, 23, 11, 26, 21, 34, 13, 36, 23, 24, 7, 27, 18, 38, 16, 29, 20
Offset: 1

Views

Author

Gus Wiseman, Jan 05 2025

Keywords

Comments

A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798.
Includes all positive integers.

Crossrefs

For prime factors instead of indices we have A075254, subtracted A075255.
Positions of first appearances are A379682.
For minus instead of plus we have A325036, which takes the following values:
- zero: A301987, counted by A001055
- negative: A325037, counted by A114324
- positive: A325038, counted by A096276 shifted right
- negative one: A325041, counted by A028422
- one: A325042, counted by A001055 shifted right
- nonnegative: A325044, counted by A096276
- nonpositive: A379721, counted by A319005
A000040 lists the primes, differences A001223.
A055396 gives least prime index, greatest A061395.
A056239 adds up prime indices, row sums of A112798, counted by A001222.

Programs

  • Mathematica
    prix[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Table[Plus@@prix[n]+Times@@prix[n],{n,30}]

Formula

a(n) = A056239(n) + A003963(n).
The last position of k is 2^(k-1).
Showing 1-10 of 29 results. Next