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 102 results. Next

A162022 Smallest prime factor of n-th odd composite integers A071904.

Original entry on oeis.org

3, 3, 3, 5, 3, 3, 5, 3, 3, 7, 3, 5, 3, 3, 5, 3, 3, 7, 3, 5, 3, 7, 3, 5, 3, 3, 3, 5, 3, 7, 11, 3, 5, 3, 7, 3, 3, 11, 5, 3, 3, 5, 3, 7, 3, 13, 3, 5, 3, 3, 5, 11, 3, 3, 3, 7, 5, 3, 11, 3, 5, 7, 3, 13, 3, 3, 5, 3, 3, 5, 13, 3, 11, 3, 7, 3, 5, 3, 3, 5, 3, 3, 7, 17, 3, 5, 3, 13, 7, 3, 5, 3, 3, 11, 3, 17, 5, 3, 7, 3
Offset: 1

Views

Author

Zak Seidov, Jun 25 2009

Keywords

Comments

Records are for n's such that A071904(n) = squares of primes.
a(n) = A020639(A071904(n)). [Reinhard Zumkeller, Oct 10 2011]

Examples

			A071904(1)=9, hence a(1)=3, A071904(4)=25, hence a(4)=5.
		

Crossrefs

Programs

  • Mathematica
    nn=501;With[{ci=Complement[Range[9,nn,2],Prime[Range[PrimePi[nn]]]]}, FactorInteger[ #][[1,1]]&/@ci] (* Harvey P. Dale, Nov 30 2012 *)
  • Python
    from sympy import primepi, primefactors
    def A162022(n):
        if n == 1: return 3
        m, k = n, primepi(n) + n + (n>>1)
        while m != k:
            m, k = k, primepi(k) + n + (k>>1)
        return min(primefactors(m)) # Chai Wah Wu, Jul 31 2024

Extensions

Corrected example a(4)=5 Francesco Antoni (francesco_antoni(AT)yahoo.com), Aug 04 2010

A164510 First differences of A071904 (Odd composite numbers).

Original entry on oeis.org

6, 6, 4, 2, 6, 2, 4, 6, 4, 2, 4, 2, 6, 2, 4, 6, 2, 4, 4, 2, 4, 2, 2, 4, 6, 6, 4, 2, 2, 2, 2, 2, 4, 4, 2, 6, 2, 2, 2, 6, 2, 4, 2, 4, 4, 2, 4, 2, 6, 2, 2, 2, 6, 6, 2, 2, 2, 2, 4, 2, 2, 2, 2, 4, 6, 4, 2, 6, 2, 2, 2, 4, 2, 4, 2, 4, 2, 6, 2, 4, 6, 2, 2, 2, 4, 2, 2, 2, 2, 2, 4, 6, 4, 2, 2, 2, 2, 2, 4, 2, 4, 2, 2, 2, 6
Offset: 1

Views

Author

Zak Seidov, Aug 14 2009

Keywords

Comments

Are all terms <=6?
This is A067970 without its first term. [R. J. Mathar, Aug 17 2009]
Yes, all terms are at most 6. For a value of 8, we have to have p, p+2, p+4 all prime, and this is possible only for p=3. As a result, 1 would have to be an odd composite number, which it is not. Therefore all terms are <=6. [J. Lowell, Aug 17 2009]

Crossrefs

Cf. A071904.

Programs

  • Mathematica
    Differences@ Select[Range[1, 360, 2], CompositeQ] (* Michael De Vlieger, Aug 29 2025 *)
  • Python
    from sympy import primepi, isprime
    def A164510(n):
        m, k = n, primepi(n+1) + n + (n+1>>1)
        while m != k:
            m, k = k, primepi(k) + n + (k>>1)
        for d in range(2, 7, 2):
            if not isprime(m+d):
                return d # Chai Wah Wu, Aug 02 2024

A134229 Sum of the odd composites A071904 less than or equal to 1+2*10^n.

Original entry on oeis.org

45, 5975, 724952, 78848811, 8290599189, 857088171080, 87727442181950, 8924793000002668, 904326399306717962, 91382247906379573443, 9216035852504141985766, 928095944723211397518108, 93359489289526851301833406, 9383123076016179512328557690
Offset: 1

Views

Author

Enoch Haga, Oct 14 2007

Keywords

Comments

A134228(n) + a(n) = A134230(n).

Examples

			a(1)=45 because that is the sum of the odd composites (9+15+21=45) less than or equal to 21.
		

Crossrefs

Formula

a(n) = sum{A071904(i): A071904(i) <= 1+2*10^n}. - R. J. Mathar, Oct 28 2007

Extensions

Better definition from R. J. Mathar, Oct 28 2007
a(9)-a(14) from Hiroaki Yamanouchi, Jul 06 2014

A256252 Number of successive odd noncomposite numbers A006005 and number of successive odd composite numbers A071904, interleaved.

Original entry on oeis.org

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

Views

Author

Omar E. Pol, Mar 30 2015

Keywords

Comments

See also A256253 and A256262 which contain similar diagrams.

Examples

			Consider an irregular array in which the odd-indexed rows list successive odd noncomposite numbers (A006005) and the even-indexed rows list successive odd composite numbers (A071904), in the sequence of odd numbers (A005408), as shown below:
1, 3, 5, 7;
9;
11, 13;
15;
17; 19;
21,
23;
25, 27;
39, 31;
...
a(n) is the length of the n-th row.
.
Illustration of the first 16 regions of the diagram of the symmetric representation of odd noncomposite numbers A006005 and odd composite numbers A071904:
.            _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.           |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _  |   31
.           |_ _ _ _ _ _ _ _ _ _ _ _ _ _  | |   29
.           | | |_ _ _ _ _ _ _ _ _ _ _  | | |   23
.           | | | |_ _ _ _ _ _ _ _ _  | | | |   19
.           | | | |_ _ _ _ _ _ _ _  | | | | |   17
.           | | | | |_ _ _ _ _ _  | | | | | |   13
.           | | | | |_ _ _ _ _  | | | | | | |   11
.           | | | | | |_ _ _  | | | | | | | |    7
.           | | | | | |_ _  | | | | | | | | |    5
.           | | | | | |_  | | | | | | | | | |    3
.   A071904 | | | | | |_|_|_|_| | | | | | | |    1
.      9    | | | | |_ _ _ _ _|_|_| | | | | | A006005
.     15    | | | |_ _ _ _ _ _ _ _|_|_| | | |
.     21    | | |_ _ _ _ _ _ _ _ _ _ _|_| | |
.     25    | |_ _ _ _ _ _ _ _ _ _ _ _ _| | |
.     27    |_ _ _ _ _ _ _ _ _ _ _ _ _ _|_|_|
.
a(n) is also the length of the n-th boundary segment in the zig-zag path of the above diagram, between the two types of numbers, as shown below for n = 1..9:
.                      _ _ _ _
.                             |_ _
.                                 |_ _
.                                     |_
.                                       |
.                                       |_ _
.
The sequence begins:      4,1,2,1,2,1,1,2,2,...
.
		

Crossrefs

Programs

  • PARI
    lista(nn) = {my(nb = 1, isc = 0); forstep (n=3, nn, 2, if (bitxor(isc, isprime(n)), nb++, print1(nb, ", "); nb = 1; isc = ! isc););} \\ Michel Marcus, May 25 2015

Formula

a(n) = A256253(n+1), n >= 2.

A280285 Number of partitions of n into odd composite numbers (A071904).

Original entry on oeis.org

1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 2, 0, 0, 2, 0, 0, 2, 1, 1, 3, 0, 0, 3, 1, 0, 4, 1, 1, 5, 1, 0, 5, 2, 2, 6, 2, 1, 8, 3, 1, 8, 3, 2, 11, 3, 2, 12, 5, 4, 13, 5, 3, 16, 8, 4, 18, 7, 6, 22, 9, 7, 24, 12, 9, 28, 12, 9, 33, 18, 11, 36, 18, 14, 45, 22, 16, 48, 26, 22, 54, 29, 23, 66, 38
Offset: 0

Views

Author

Ilya Gutkovskiy, Dec 31 2016

Keywords

Examples

			a(36) = 3 because we have [27, 9], [21, 15] and [9, 9, 9, 9].
		

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember; `if`(n=0, 1, add(add(
          `if`(d>1 and d::odd and not isprime(d), d, 0),
           d=numtheory[divisors](j))*a(n-j), j=1..n)/n)
        end:
    seq(a(n), n=0..100);  # Alois P. Heinz, Dec 31 2016
  • Mathematica
    nmax = 100; CoefficientList[Series[(1 - x)/(1 - x^2) Product[(1 - x^(2 k)) (1 - x^Prime[k])/(1 - x^k), {k, 1, nmax}], {x, 0, nmax}], x]

Formula

G.f.: ((1 - x)/(1 - x^2))*Product_{k>=1} (1 - x^(2*k))*(1 - x^prime(k))/(1 - x^k).

A281681 a(n) = A055396(A071904(n)) - 1.

Original entry on oeis.org

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

Views

Author

Enrique Navarrete, Jan 26 2017

Keywords

Comments

The sequence measures, in a sense, inversions in remainders of odd numbers upon factoring out their largest divisors (see A281680).
In A281680, we have A281680(4) = A281680(7) = A281680(10) = 3 (and there will be infinitely many 1's to the right after each one of them), so there is why a(1)=a(2)=a(3)=1. Then we have A281680(12) = 5 (and there will be infinitely many 1's and 3's to the right), so that's why a(4) = 2, and so forth. I used 1,2,3,... here to represent these inversions, but any other symbols could have been used.
Entries correspond to the position of the lowest prime factor of the odd composites, with prime=3 being position 1. - Bill McEachen, Jan 28 2018

Crossrefs

Programs

  • PARI
    genit(maxx)={forcomposite(i5=9,maxx,if(i5%2==0,next);ptr=0;forprime(x=3,maxx,ptr+=1;if(i5%x==0,print1(ptr,",");break)));} \\ Bill McEachen, Jan 28 2018
    
  • Python
    from sympy import primepi, primefactors
    def A281681(n):
        if n == 1: return 1
        m, k = n, primepi(n) + n + (n>>1)
        while m != k:
            m, k = k, primepi(k) + n + (k>>1)
        return primepi(min(primefactors(m)))-1 # Chai Wah Wu, Aug 02 2024

Extensions

Name changed by Robert Israel, Aug 03 2020

A292597 a(1) = 1; for n > 1, a(n) = c(n) + 2*a(floor(n/2)), where c(n) is the characteristic function of odd composites, A071904.

Original entry on oeis.org

1, 2, 2, 4, 4, 4, 4, 8, 9, 8, 8, 8, 8, 8, 9, 16, 16, 18, 18, 16, 17, 16, 16, 16, 17, 16, 17, 16, 16, 18, 18, 32, 33, 32, 33, 36, 36, 36, 37, 32, 32, 34, 34, 32, 33, 32, 32, 32, 33, 34, 35, 32, 32, 34, 35, 32, 33, 32, 32, 36, 36, 36, 37, 64, 65, 66, 66, 64, 65, 66, 66, 72, 72, 72, 73, 72, 73, 74, 74, 64, 65, 64, 64, 68, 69, 68, 69, 64, 64, 66, 67
Offset: 1

Views

Author

Antti Karttunen, Sep 27 2017

Keywords

Comments

1-bits in base-2 expansion of a(n) indicate the positions of odd nonprimes in the sequence [n, floor(n/2), floor(n/4), ..., 1].

Crossrefs

Formula

a(1) = 1; for n > 1, a(n) = (A000035(n)*(1-A010051(n))) + 2*a(floor(n/2)).
For all n >= 1, a(n) + A292596(n) = n.

A276662 Iterative procedure in A316941 applied to the odd composite numbers (A071904) (a(n) = -1 if no prime is ever reached).

Original entry on oeis.org

311, 1129, 37, 773, 313, 311, 1129, 313, 3119014487, 31079, 317, 773, 1129, 3110647, 3103819425079, 310397, 5113, 31079, 3109, 3137, 310361, 31259, 331, 36389, 191176757654383, 31063, 337, 523, 324941, 31393, 127139, 33769, 31034567124791, 32369, 719, 5623, 347, 3371, 131777, 349, 31039, 34412909
Offset: 1

Views

Author

Bill McEachen, Sep 11 2016

Keywords

Comments

a(n) = A316941(A071904).

Examples

			The first entry is from 9 = 3*3. 33 = 3*11, and 311 is prime.
A longer 10 step progression is a(9) from 45. Specifically, 45=3*15 concatenating to 315=3*105 concatenating to 3105=3*1035 concatenating to 31035=3*10345 concatenating to 310345=5*62069 concatenating to 562069=41*13709 concatenating to 4113709=19*216511 concatenating to 19216511=17*1130383 concatenating to 171130383 = 3*57043461 concatenating to 357043461=3*119014487 concatenating to 3119014487 which is prime. a(9) then is 3119014487.
		

Crossrefs

Programs

  • Mathematica
    Map[NestWhile[Function[n, FromDigits@ Flatten@ IntegerDigits@ {#, n/#} &[FactorInteger[n][[1, 1]]]], #, ! PrimeQ@ # &] &, Select[Range[9, 157, 2], CompositeQ]] (* Michael De Vlieger, Sep 13 2016 *)
  • PARI
    genit(iend)={i5=9;while(i5<=iend,n=i5;while(isprime(n),n+=2);i5=n;endless=0;while(endless<99999,dun=0;z=divisors(n);
    a=z[2];b=n/a;k=length(digits(b));q=a*10^k+b;if(isprime(q),dun=1;break);endless+=1;n=q);if(dun>0,print1(q,","));i5+=2);}
    
  • Python
    from sympy import primepi, primefactors, factorint
    def A276662(n):
        if n == 1: return 311
        m, k = n, primepi(n) + n + (n>>1)
        while m != k:
            m, k = k, primepi(k) + n + (k>>1)
        while sum((f:=factorint(m)).values()) > 1:
            m = int(str(p:=min(f))+str(m//p))
        return m # Chai Wah Wu, Aug 02 2024

Extensions

Edited by N. J. A. Sloane, Oct 02 2016

A280287 Number of partitions of n into distinct odd composite numbers (A071904).

Original entry on oeis.org

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

Views

Author

Ilya Gutkovskiy, Dec 31 2016

Keywords

Examples

			a(48) = 3 because we have [39, 9], [33, 15] and [27, 21].
		

Crossrefs

Programs

  • Mathematica
    nmax = 105; CoefficientList[Series[(1 + x^2)/(1 + x) Product[(1 + x^k)/((1 + x^(2 k)) (1 + x^Prime[k])), {k, 1, nmax}], {x, 0, nmax}], x]

Formula

G.f.: ((1 + x^2)/(1 + x))*Product_{k>=1} (1 + x^k)/((1 + x^(2*k))*(1 + x^prime(k))).

A283801 Concatenation of the first n odd composite numbers (A071904).

Original entry on oeis.org

9, 915, 91521, 9152125, 915212527, 91521252733, 9152125273335, 915212527333539, 91521252733353945, 9152125273335394549, 915212527333539454951, 91521252733353945495155, 9152125273335394549515557, 915212527333539454951555763, 91521252733353945495155576365
Offset: 1

Views

Author

XU Pingya, Mar 17 2017

Keywords

Comments

There are 3 primes in the first 5028 terms of this sequence, see A283802.

Crossrefs

Programs

  • Mathematica
    bb[1]=9;bb[n_]:=bb[n]=Which[PrimeQ[bb[n-1]+2]==False,bb[n-1]+2,PrimeQ[bb[n-1]+4]==False,bb[n-1]+4,True,bb[n-1]+6];coc[n_]:=FromDigits[Flatten[IntegerDigits[Table[bb[k],{k,1,n}]]]];Table[coc[n],14]
    f[n_] := Block[{oc = cc = 0, k = 2}, While[oc <= n, If[ OddQ@ k && !PrimeQ@ k, cc = cc*10^IntegerLength[k] +k; oc++]; k++]; cc]; Array[f, 14] (* Robert G. Wilson v, Mar 17 2017 *)
Showing 1-10 of 102 results. Next