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

A275464 a(n) = n - A038802(n).

Original entry on oeis.org

0, 0, 0, 3, 1, 1, 6, 2, 2, 9, 3, 10, 12, 5, 5, 15, 15, 7, 18, 8, 8, 21, 9, 21, 24, 11, 25, 27, 13, 13, 30, 30, 15, 33, 16, 16, 36, 35, 18, 39, 19, 40, 42, 21, 42, 45, 45, 24, 48, 25, 25, 51, 26, 26, 54, 27, 55, 57, 56, 56, 60, 60, 33, 63, 34, 63, 66, 36, 36, 69, 67, 70, 72, 40, 40, 75, 75, 42, 78, 77, 44, 81
Offset: 1

Views

Author

Raphael Ranna, Jul 28 2016

Keywords

Examples

			9 = (2^0)*(3^2), resulting in 1 zero. So, a(4) = 4 - 1 = 3.
		

Crossrefs

Cf. A038802.

Programs

  • Mathematica
    Table[f = FactorInteger[2 n + 1]; n - (PrimePi[f[[1, 1]]] - 1), {n, 100}]
  • PARI
    lpf(n)=factor(n)[1,1]
    a(n)=n - primepi(lpf(2*n+1)) + 1 \\ Charles R Greathouse IV, Jul 29 2016

Formula

a(n) = n - (A049084(A020639(2n+1)) - 1).
a(n) = n + O(n/log n). - Charles R Greathouse IV, Jul 29 2016

Extensions

Duplicate a(44)-a(45) removed by Andrew Howroyd, Feb 23 2018

A372441 Number of binary indices (binary weight) of n minus number of prime indices (bigomega) of n.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, May 07 2024

Keywords

Comments

A binary index of n is any position of a 1 in its reversed binary expansion. The binary indices of n are row n of A048793.
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.

Crossrefs

Positions of zeros are A071814.
For sum instead of length we have A372428, zeros A372427.
For minimum instead of length we have A372437, zeros {}.
For maximum instead of length we have A372442, zeros A372436.
Positions of odd terms are A372590, even A372591.
A003963 gives product of prime indices.
A019565 gives Heinz number of binary indices, adjoint A048675.
A029837 gives greatest binary index, least A001511.
A048793 lists binary indices, length A000120, reverse A272020, sum A029931.
A061395 gives greatest prime index, least A055396.
A070939 gives length of binary expansion.
A112798 lists prime indices, length A001222, reverse A296150, sum A056239.

Programs

  • Maple
    f:= proc(n) convert(convert(n,base,2),`+`)-numtheory:-bigomega(n) end proc:
    map(f, [$1..100]); # Robert Israel, May 22 2024
  • Mathematica
    bix[n_]:=Join@@Position[Reverse[IntegerDigits[n,2]],1];
    prix[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Table[Length[bix[n]]-Length[prix[n]],{n,100}]

Formula

a(n) = A000120(n) - A001222(n).

A372437 (Least binary index of n) minus (least prime index of n).

Original entry on oeis.org

1, -1, 2, -2, 1, -3, 3, -1, 1, -4, 2, -5, 1, -1, 4, -6, 1, -7, 2, -1, 1, -8, 3, -2, 1, -1, 2, -9, 1, -10, 5, -1, 1, -2, 2, -11, 1, -1, 3, -12, 1, -13, 2, -1, 1, -14, 4, -3, 1, -1, 2, -15, 1, -2, 3, -1, 1, -16, 2, -17, 1, -1, 6, -2, 1, -18, 2, -1, 1, -19, 3
Offset: 2

Views

Author

Gus Wiseman, May 06 2024

Keywords

Comments

A binary index of n is any position of a 1 in its reversed binary expansion. The binary indices of n are row n of A048793.
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.
Is 0 the only integer not appearing in the data?

Crossrefs

Positions of first appearances are A174090.
For sum instead of minimum we have A372428, zeros A372427.
For maximum instead of minimum we have A372442, zeros A372436.
For length instead of minimum we have A372441, zeros A071814.
A003963 gives product of prime indices.
A019565 gives Heinz number of binary indices, adjoint A048675.
A029837 gives greatest binary index, least A001511.
A048793 lists binary indices, length A000120, reverse A272020, sum A029931.
A061395 gives greatest prime index, least A055396.
A070939 gives length of binary expansion.
A112798 lists prime indices, length A001222, reverse A296150, sum A056239.

Programs

  • Mathematica
    bix[n_]:=Join@@Position[Reverse[IntegerDigits[n,2]],1];
    prix[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Table[Min[bix[n]]-Min[prix[n]],{n,2,100}]

Formula

a(2n) = A001511(n).
a(2n + 1) = -A038802(n).
a(n) = A001511(n) - A055396(n).

A292374 a(1) = 1, a(2n) = 0, and for odd numbers n > 1, a(n) = a(A064989(n)) + [n == 1 (mod 4)].

Original entry on oeis.org

1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 2, 0, 0, 0, 3, 0, 3, 0, 1, 0, 3, 0, 2, 0, 0, 0, 4, 0, 4, 0, 1, 0, 0, 0, 5, 0, 0, 0, 6, 0, 6, 0, 1, 0, 6, 0, 3, 0, 0, 0, 7, 0, 1, 0, 1, 0, 7, 0, 8, 0, 0, 0, 2, 0, 8, 0, 1, 0, 8, 0, 9, 0, 0, 0, 1, 0, 9, 0, 1, 0, 9, 0, 1, 0, 0, 0, 10, 0, 1, 0, 1, 0, 0, 0, 11, 0, 0, 0, 12, 0, 12, 0, 1
Offset: 1

Views

Author

Antti Karttunen, Sep 17 2017

Keywords

Comments

For odd numbers > 1, iterate the map x -> A064989(x), which shifts every prime in the prime factorization of n one index step towards smaller primes. a(n) counts the numbers of the form 4k+1 encountered until the first number which is even has been reached. This count includes also n itself if it is of the form 4k+1 (A016813), thus a(1) = 1.
In other words, locate the position where n is in square array A246278 and moving up by that column, count all numbers of the form 4k+1 until an even number at the top of the column is reached.

Crossrefs

Cf. also A038802 (odd bisection of a(n) + A292376(n)).

Programs

  • Mathematica
    a[1] = 1; a[n_] := a[n] = If[EvenQ@ n, 0, a[Times @@ Power[Which[# == 1, 1, # == 2, 1, True, NextPrime[#, -1]] & /@ First@ #, Last@ #] &@ Transpose@ FactorInteger@ n] + Boole[Mod[n, 4] == 1]]; Array[a, 105] (* Michael De Vlieger, Sep 17 2017 *)
  • 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)};
    A292374(n) = if(1==n,n,if(!(n%2),0,(if(1==(n%4),1,0)+A292374(A064989(n)))));
    
  • Scheme
    ;; With memoization-macro definec.
    (definec (A292374 n) (cond ((even? n) 0) ((= 1 n) 1) (else (+ (if (= 1 (modulo n 4)) 1 0) (A292374 (A064989 n))))))

Formula

a(1) = 1, a(2n) = 0, and for odd numbers n > 1, a(n) = a(A064989(n)) + [n == 1 (mod 4)].
a(n) <= A292375(n).
For n >= 2, a(n) + A292376(n) + 1 = A055396(n).

A292376 a(1) = 0, a(2n) = 0, and for odd numbers n > 1, a(n) = a(A064989(n)) + [n == 3 (mod 4)].

Original entry on oeis.org

0, 0, 1, 0, 1, 0, 2, 0, 0, 0, 3, 0, 3, 0, 1, 0, 3, 0, 4, 0, 0, 0, 5, 0, 0, 0, 1, 0, 5, 0, 6, 0, 0, 0, 2, 0, 6, 0, 1, 0, 6, 0, 7, 0, 0, 0, 8, 0, 0, 0, 1, 0, 8, 0, 1, 0, 0, 0, 9, 0, 9, 0, 1, 0, 0, 0, 10, 0, 0, 0, 11, 0, 11, 0, 1, 0, 2, 0, 12, 0, 0, 0, 13, 0, 1, 0, 1, 0, 13, 0, 2, 0, 0, 0, 2, 0, 13, 0, 1, 0, 13, 0, 14, 0, 0
Offset: 1

Views

Author

Antti Karttunen, Sep 17 2017

Keywords

Comments

For odd numbers > 1, iterate the map x -> A064989(x), which shifts every prime in the prime factorization of n one index step towards smaller primes. a(n) counts the numbers of the form 4k+3 encountered until the first number which is even has been reached. This count includes also n itself if it is of the form 4k+3 (A004767).
In other words, locate the position where n is in square array A246278 and moving up by that column, count all numbers of the form 4k+3 before an even number at the top of the column is reached.

Crossrefs

Cf. also A038802 (odd bisection of a(n) + A292374(n)).

Programs

  • Mathematica
    a[1] = 0; a[n_] := a[n] = If[EvenQ@ n, 0, a[Times @@ Power[Which[# == 1, 1, # == 2, 1, True, NextPrime[#, -1]] & /@ First@ #, Last@ #] &@ Transpose@ FactorInteger@ n] + Boole[Mod[n, 4] == 3]]; Array[a, 105] (* Michael De Vlieger, Sep 17 2017 *)

Formula

a(1) = 0, a(2n) = 0, and for odd numbers n > 1, a(n) = a(A064989(n)) + floor((n mod 4)/3).
Other identities and observations. For n >= 1.
a(n) <= A292377(n).
For n >= 2, a(n) + A292374(n) + 1 = A055396(n).

A182843 Number of composite integers greater than or equal to n whose proper divisors are all less than n.

Original entry on oeis.org

0, 0, 1, 3, 3, 6, 6, 10, 10, 11, 11, 16, 16, 22, 22, 23, 23, 30, 30, 38, 38, 39, 39, 48, 48, 50, 50, 51, 51, 61, 61, 72, 72, 73, 73, 75, 75, 87, 87, 88, 88, 101, 101, 115, 115, 116, 116, 131, 131, 134, 134, 135, 135, 151, 151, 153, 153, 154, 154, 171, 171, 189, 189, 190, 190, 192, 192, 211, 211
Offset: 1

Views

Author

Fintan Costello, Feb 28 2011

Keywords

Examples

			Example: For n=4 the only composite integers greater than or equal to 4 all of whose proper divisors are all less than 4 are 4,6, and 9.  Since there are 3 such integers, a(4)=3.
		

Crossrefs

Programs

  • Mathematica
    Join[{0}, Table[Length[Select[Range[n, n^2], ! PrimeQ[#] && Divisors[#][[-2]] < n &]], {n, 2, 100}]] (* T. D. Noe, Feb 28 2011 *)

Formula

a(n+1) = a(n)+b(n)+c(n), where b(n) is 1 if n is prime, 0 otherwise (sequence A010051) and c(n) is the number of primes less than the minimum prime factor of n. Since b(2n)=c(2n)=0 for all n>1 we see that a(2n+1)=a(2n) for all n>1. Taking d(n) to represent sequence A038802 we have a(2n)=a(2n-1)+c(2n-1)+d(n-1).

A186929 Number of squarefree composite integers greater than or equal to n whose proper divisors are all less than n.

Original entry on oeis.org

0, 0, 0, 1, 1, 3, 2, 5, 5, 5, 4, 8, 8, 13, 12, 12, 12, 18, 18, 25, 25, 25, 24, 32, 32, 32, 31, 31, 31, 40, 39, 49, 49, 49, 48, 49, 49, 60, 59, 59, 59, 71, 70, 83, 83, 83, 82, 96, 96, 96, 96, 96, 96, 111, 111, 112, 112, 112, 111, 127, 127, 144, 143, 143, 143, 144, 143, 161, 161, 161, 160
Offset: 1

Views

Author

Fintan Costello, Mar 01 2011

Keywords

Examples

			For n=6 the only squarefree composite integers greater than or equal to 6 all of whose proper divisors are all less than 6 are 6, 10 and 15.  Since there are 3 such integers, a(6)=3.
		

Crossrefs

Cf. A182843.

Programs

  • Mathematica
    Join[{0}, Table[Length[Select[Range[n, n^2], SquareFreeQ[#] && ! PrimeQ[#] && Divisors[#][[-2]] < n &]], {n, 2, 100}]] (* T. D. Noe, Mar 01 2011 *)

Formula

a(n+1) = a(n)+b(n)(c(n)+d(n)), where b(n) is 1 if n is squarefree, 0 otherwise (sequence A008966), c(n) is 1 if n is composite, 0 otherwise (sequence A066247), and d(n) is the number of primes less than the minimum prime factor of n. Since d(2n)=0 for all n we see that a(2n+1)=a(2n)+b(2n)c(2n). Taking f(n) to represent sequence A038802 we have a(2n)=a(2n-1)+b(2n-1)(c(2n-1)+f(n-1)).

Extensions

more
Showing 1-7 of 7 results.