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

A063131 Odd composite numbers which in base 2 contain their largest proper factor as a substring of digits.

Original entry on oeis.org

55, 91, 215, 407, 493, 893, 1189, 1343, 1403, 1643, 1681, 1961, 3151, 3223, 3415, 4063, 4579, 7087, 7597, 7979, 8791, 9167, 10579, 11227, 13303, 13655, 14219, 15487, 16147, 22939, 23479, 24341, 25751, 26101, 27571, 28757, 30461, 30607
Offset: 1

Views

Author

Robert G. Wilson v, Aug 08 2001

Keywords

Comments

The Pascal program checks to n=100000 in about a second on a 2GHz desktop, about three times as fast than the Mathematica program.

Crossrefs

Programs

  • Magma
    [k:k in [3..31000 by 2] | not IsPrime(k) and IntegerToString(Seqint(Intseq(Max(Set(Divisors(k)) diff {k}),2))) in IntegerToString(Seqint(Intseq(k)),2)]; // Marius A. Burtea, Jan 29 2020
    
  • Mathematica
    Do[ If[ !PrimeQ[ n ] && StringPosition[ ToString[ FromDigits[ IntegerDigits[ n, 2 ] ] ], ToString[ FromDigits[ IntegerDigits[ Divisors[ n ] [ [ -2 ] ], 2 ] ] ] ] != {}, Print[ n ] ], {n, 3, 500, 2} ]
  • Pascal
    program A063131; var n,nn,lpd:longint; nstr,dstr:string; function prime(n:longint; var d:longint):boolean; var sq,i:longint; begin{PRIME} sq := round(sqrt(n)); for i := 2 to sq do if n mod i=0 then begin d := n div i; prime := false; exit; end; prime := true; end{PRIME}; begin{MAIN} for n := 3 to 100000 do if (n mod 2=1) and (not prime(n,lpd)) then begin nn := n; nstr := ''; repeat if nn mod 2=1 then nstr := '1'+nstr else nstr := '0'+nstr; nn := nn div 2; until nn=0; dstr := ''; repeat if lpd mod 2=1 then dstr := '1'+dstr else dstr := '0'+dstr; lpd := lpd div 2; until lpd=0; if pos(dstr,nstr)>0 then write(n:8); end; end.
    
  • Python
    from sympy import divisors, isprime
    def ok(n):
        if n < 4 or n&1 == 0 or isprime(n): return False
        return bin(divisors(n)[-2])[2:] in bin(n)[2:]
    print([k for k in range(10**5) if ok(k)]) # Michael S. Branicky, Jul 29 2022

Extensions

Extended and edited by John W. Layman, Apr 06 2002

A063127 Composite numbers which in base 2 contain their largest proper factor as a substring.

Original entry on oeis.org

4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 55, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 91, 92, 94, 96, 98, 100, 102, 104, 106, 108, 110, 112, 114, 116, 118, 120, 122, 124, 126, 128
Offset: 1

Views

Author

Robert G. Wilson v, Aug 08 2001

Keywords

Comments

This is also the set of highest rolls that can be made with some number of platonic dice (dice which are platonic solids, considered to be the most "fair" dice). For instance, 22 is the highest roll with a die which is a dodecahedron, a cubic die, and a tetrahedral die. - Joshua R. Tint, Sep 08 2020
Contains every even number > 2. Odd terms are A063131. - David A. Corneth, Sep 09 2020

Examples

			55 is in the sequence as 55 = 110111_2 and the largest proper divisor of 55 is 11 and 11 = 1011_2 which is contained in 110111_2. - _David A. Corneth_, Sep 08 2020
		

Crossrefs

Programs

  • Mathematica
    Do[ If[ !PrimeQ[ n ] && StringPosition[ ToString[ FromDigits[ IntegerDigits[ n, 2 ] ] ], ToString[ FromDigits[ IntegerDigits[ Divisors[ n ] [ [ -2 ] ], 2 ] ] ] ] != {}, Print[ n ] ], {n, 2, 150} ]

A063138 Composite numbers not divisible by 2, 3, 5 or 7 which in base 2 contain their largest proper factor as a substring.

Original entry on oeis.org

407, 493, 893, 1189, 1343, 1403, 1643, 1681, 1961, 3151, 3223, 4063, 4579, 7087, 7597, 7979, 8791, 9167, 10579, 11227, 13303, 14219, 15487, 16147, 23479, 24341, 25751, 26101, 27571, 28757, 30461, 30607, 33431, 34093, 35417, 36349, 39917
Offset: 1

Views

Author

Robert G. Wilson v, Aug 08 2001; corrected Nov 13 2002

Keywords

Examples

			407 is in the sequence because 407_d = 110010111_b and its largest proper divisor is 37_d = 100101_b is a substring. Also 407 is not prime nor congruent to 0 (modulo either 2, 3, 5 or 7).
		

Crossrefs

Programs

  • Mathematica
    a = {}; Do[ If[ !PrimeQ[n] && Sort[Mod[n, {3, 5, 7}]][[1]] != 0 && StringPosition[ ToString[ FromDigits[ IntegerDigits[n, 2]]], ToString[ FromDigits[ IntegerDigits[ Divisors[n][[ -2]], 2]]]] != {}, a = Append[a, n]], {n, 3, 39960, 2}]; a

A063132 Composite numbers not divisible by 2 or 3 which in base 3 contain their largest proper factor as a substring.

Original entry on oeis.org

49, 427, 671, 949, 1387, 1679, 1849, 2117, 3397, 3829, 4307, 6017, 6169, 7141, 8299, 10547, 11773, 13703, 17161, 17819, 19517, 24523, 25019, 25877, 29941, 30607, 31459, 33853, 34447, 34547, 35657, 35947, 38243, 38491, 38579, 39283, 45571
Offset: 1

Views

Author

Robert G. Wilson v, Aug 08 2001

Keywords

Crossrefs

Programs

  • Mathematica
    Do[ If[ !PrimeQ[ n ] && Mod[ n, 3 ] != 0 && StringPosition[ ToString[ FromDigits[ IntegerDigits[ n, 3 ] ] ], ToString[ FromDigits[ IntegerDigits[ Divisors[ n ][ [ -2 ] ], 3 ] ] ] ] != {}, Print[ n ] ], {n, 3, 10^5, 2} ]

A063137 Composite numbers not divisible by 2, 3 or 5 which contain their largest prime factor as a substring in base 2.

Original entry on oeis.org

91, 343, 407, 493, 539, 637, 893, 1001, 1189, 1309, 1343, 1403, 1643, 1681, 1771, 1859, 1961, 2527, 2717, 2783, 3059, 3151, 3179, 3223, 3451, 3703, 3731, 3773, 3887, 4063, 4199, 4459, 4579, 4669, 4823, 4913, 4991, 5291, 5453, 5491, 5719
Offset: 1

Views

Author

Robert G. Wilson v, Aug 08 2001

Keywords

Examples

			a(7)= 19 * 47= 893: '1101111101' contains '101111' (47) and 5 < 19.
		

Crossrefs

Cf. A062238.

Programs

  • PARI
    sub(a,b)=my(m=1<<(log(2*a+1)\log(2))-1);while(b>=a,if(bitand(b,m)==a,return(1));b>>=1);0
    gpf(n)=n=factor(n)[,1];n[#n]
    is(n)=gcd(n,30)==1&&!isprime(n)&&sub(gpf(n),n) \\ Charles R Greathouse IV, Dec 08 2011

Extensions

Edited by Frank Ellermann, Feb 08 2002

A063145 Composite numbers not divisible by 2 which in base 4 contain their largest proper factor as a substring.

Original entry on oeis.org

407, 1189, 1343, 1681, 7597, 8791, 10579, 16147, 23479, 24341, 25751, 26101, 28757, 34093, 36349, 39961, 47053, 47669, 52891, 58879, 62263, 64277, 79223, 88183, 93829, 96029, 98261
Offset: 1

Views

Author

Robert G. Wilson v, Aug 08 2001

Keywords

Crossrefs

Cf. A062238.

Programs

  • Mathematica
    Do[ If[ !PrimeQ[ n ] && StringPosition[ ToString[ FromDigits[ IntegerDigits[ n, 4 ] ] ], ToString[ FromDigits[ IntegerDigits[ Divisors[ n ][ [ -2 ] ], 4 ] ] ] ] != {}, Print[ n ] ], {n, 3, 10^5, 2} ]

A063149 Composite numbers which in base 5 contain their largest proper factor as a substring.

Original entry on oeis.org

25, 35, 55, 65, 85, 95, 115, 125, 145, 155, 175, 185, 205, 215, 235, 245, 265, 275, 295, 305, 325, 335, 355, 365, 385, 395, 415, 425, 445, 455, 475, 485, 505, 515, 535, 545, 565, 575, 595, 605, 625, 635, 655, 665, 685, 695, 715, 725, 745, 755, 775, 785, 805
Offset: 1

Views

Author

Robert G. Wilson v, Aug 08 2001

Keywords

Crossrefs

Cf. A062238.

Programs

  • Mathematica
    Do[ If[ !PrimeQ[ n ] && StringPosition[ ToString[ FromDigits[ IntegerDigits[ n, 5 ] ] ], ToString[ FromDigits[ IntegerDigits[ Divisors[ n ] [ [ -2 ] ], 5 ] ] ] ] != {}, Print[ n ] ], {n, 2, 1000} ]
  • PARI
    a(n)=([0,1,0; 0,0,1; -1,1,1]^(n-1)*[25;35;55])[1,1] \\ Charles R Greathouse IV, Jun 05 2024

Formula

a(n) = 30*n-a(n-1) for n>1, a(1)=25. - Vincenzo Librandi, Aug 07 2010
From Chai Wah Wu, Jun 05 2024: (Start)
a(n) = a(n-1) + a(n-2) - a(n-3) for n > 3.
G.f.: x*(-5*x^2 + 10*x + 25)/((x - 1)^2*(x + 1)). (End)

A063156 Composite numbers which in base 6 contain their largest proper factor as a substring.

Original entry on oeis.org

9, 403, 8383, 9287, 14299, 15403, 16459, 17543, 19291, 20989, 25807, 26743, 30301, 68191, 96307, 111277, 120059, 121903, 158299, 166391, 195583, 221443, 238603, 248551, 292499, 317131, 356879, 403927, 421901, 422419, 440599, 443119, 457297
Offset: 1

Views

Author

Robert G. Wilson v, Aug 08 2001

Keywords

Crossrefs

Cf. A062238.

Programs

  • Mathematica
    Do[ If[ !PrimeQ[ n ] && StringPosition[ ToString[ FromDigits[ IntegerDigits[ n, 6 ] ] ], ToString[ FromDigits[ IntegerDigits[ Divisors[ n ] [ [ -2 ] ], 6 ] ] ] ] != {}, Print[ n ] ], {n, 2, 10^6} ]

A063163 Composite numbers which in base 7 contain their largest proper factor as a substring.

Original entry on oeis.org

49, 77, 91, 119, 133, 161, 203, 217, 259, 287, 301, 329, 343, 371, 413, 427, 469, 497, 511, 539, 551, 553, 581, 623, 637, 679, 707, 721, 749, 763, 791, 833, 847, 889, 917, 931, 959, 973, 989, 1001, 1043, 1057, 1099, 1127, 1141, 1169, 1183, 1211, 1253
Offset: 1

Views

Author

Robert G. Wilson v, Aug 08 2001

Keywords

Comments

Sequence contains every term of A084968 except 7. - Bill McEachen, Dec 29 2020

Examples

			91 = 160_7 and its largest proper factor is 13 = 16_7 where 16 is a substring of 160. - _Bill McEachen_, Dec 30 2020
		

Crossrefs

Programs

  • Mathematica
    Do[ If[ !PrimeQ[ n ] && StringPosition[ ToString[ FromDigits[ IntegerDigits[ n, 7 ] ] ], ToString[ FromDigits[ IntegerDigits[ Divisors[ n ] [ [ -2 ] ], 7 ] ] ] ] != {}, Print[ n ] ], {n, 2, 2000} ]
    Select[Range[1300],CompositeQ[#]&&SequenceCount[IntegerDigits[#,7],IntegerDigits[ Divisors[#][[-2]],7]]>0&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Feb 21 2021 *)
  • PARI
    isok(n)={mystr=digits(n,7);d=divisors(n);gpf=d[#d-1];seek=digits(gpf,7);ls=#seek;for(w=1,#mystr-ls+1,if(mystr[w]!=seek[1],next);for(h=1,ls-1,if(mystr[w+h]!=seek[h+1],break);if(h==ls-1,return(1))));return(0);} \\ Bill McEachen, Dec 31 2020

A063167 Composite numbers which in base 8 contain their largest proper factor as a substring.

Original entry on oeis.org

893, 1961, 7087, 14219, 30607, 35417, 47053, 53953, 55421, 61513, 80089, 90509, 127067, 157967, 162521, 186059, 233273, 340987, 344051, 378589, 442583, 458441, 469213, 607567, 617503, 668923, 671599, 739561, 767341, 868591, 923633, 927463
Offset: 1

Views

Author

Robert G. Wilson v, Aug 08 2001

Keywords

Crossrefs

Cf. A062238.

Programs

  • Mathematica
    Do[ If[ !PrimeQ[ n ] && StringPosition[ ToString[ FromDigits[ IntegerDigits[ n, 8 ] ] ], ToString[ FromDigits[ IntegerDigits[ Divisors[ n ] [ [ -2 ] ], 8 ] ] ] ] != {}, Print[ n ] ], {n, 2, 10^6} ]
Showing 1-10 of 13 results. Next