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.

User: Abdul Gaffar Khan

Abdul Gaffar Khan's wiki page.

Abdul Gaffar Khan has authored 11 sequences. Here are the ten most recent ones:

A267510 Integers in A267509 such that (B0 + B1 + ... + Bm) is congruent to 0 mod m.

Original entry on oeis.org

20, 22, 24, 26, 28, 30, 33, 36, 39, 40, 42, 44, 46, 48, 50, 55, 60, 62, 63, 64, 66, 68, 69, 70, 77, 80, 82, 84, 86, 88, 90, 93, 96, 99, 110, 121, 130, 132, 143, 150, 154, 156, 165, 169, 170, 176, 187, 190, 198, 200, 202, 204, 206, 208, 220, 222, 224, 226, 228, 231, 240
Offset: 1

Author

Abdul Gaffar Khan, Jan 16 2016

Keywords

Comments

If Bi is congruent to 0 mod m for all i=1,2,...,m then the integer n = (Bm,...,B1,B0) is a member of this sequence if and only if n is a member of A267509.

Examples

			22 is a term, as f(x)=B0+B1x=2+2x=2*(1+x)=g(x)*h(x) with g(x)=2, h(x)=1+x, and neither g(x) nor h(x) is a unit in the ring of integers implies that f(x) is reducible over the ring of integers and 2+2=4=0 mod 1.
121 is a term, as f(x)=B0+B1x+B2x^2=1+2x+1x^2=1+2x+x^2=(1+x)*(1+x)=g(x)*h(x) with g(x)=1+x=h(x) and neither g(x) nor h(x) is a unit in the ring of integers implies that f(x) is reducible over the ring of integers and 1+2+1=4=0 mod 2.
		

Crossrefs

Cf. A267509.

Programs

  • Mathematica
    okQ[n_] := MatchQ[Factor[(id = IntegerDigits[n]).x^Range[lg = Length[id] - 1, 0, -1]][[0]], Times | Power] && Divisible[Total[id], lg]; Select[ Range[240], okQ] (* Jean-François Alcover, Feb 01 2016 *)

A267521 Integers whose base-10 representation (Bm,...,B1,B0) is such that the polynomial f(x) = B0 + B1*x + ... + Bm*x^m is irreducible over the ring of integers, 0 <= Bi <= 9.

Original entry on oeis.org

1, 2, 3, 5, 7, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 21, 23, 25, 27, 29, 31, 32, 34, 35, 37, 38, 41, 43, 45, 47, 49, 51, 52, 53, 53, 56, 57, 58, 59, 61, 65, 67, 71, 72, 73, 74, 75, 76, 78, 79, 81, 83, 85, 87, 89, 91, 92, 94, 95, 97, 98, 101, 102, 103, 104, 105, 106, 107, 108, 109, 111, 112, 113, 114, 115, 116, 117, 118, 119
Offset: 1

Author

Abdul Gaffar Khan, Jan 16 2016

Keywords

Examples

			11 is a member as f(x) = B0 + B1*x = 1 + 1*x has no factorization other than the trivial one, i.e., 1*(1+x), hence f(x) is irreducible over the ring of integers.
114 is a member as f(x) = B0 + B1*x + B2*x^2 = 4 + 1*x + 1*x^2 = 4 + x + x^2 is irreducible over the ring of integers.
		

Programs

  • Mathematica
    okQ[n_] := If[n<10, !CompositeQ[n], !MatchQ[Factor[(id = IntegerDigits[n]). x^Range[Length[id]-1, 0, -1]][[0]], Times|Power]]; Select[Range[120], okQ] (* Jean-François Alcover, Feb 01 2016 *)

Formula

Integers in A000027 but not in A267509.

A267509 Integers whose base-10 representation (Bm,...,B1,B0) is such that the polynomial f(x) = B0 + B1*x + ... + Bm*x^m is reducible over the ring of integers, 0 <= Bi <= 9.

Original entry on oeis.org

4, 6, 8, 9, 20, 22, 24, 26, 28, 30, 33, 36, 39, 40, 42, 44, 46, 48, 50, 55, 60, 62, 63, 64, 66, 68, 69, 70, 77, 80, 82, 84, 86, 88, 90, 93, 96, 99, 100, 110, 120, 121, 130, 132, 140, 143, 144, 150, 154, 156, 160, 165, 168, 169, 170, 176, 180, 187, 190, 198, 200
Offset: 1

Author

Abdul Gaffar Khan, Jan 16 2016

Keywords

Examples

			4 is a term as f(x) = B0 = 4 = 2*2 = g(x)*h(x) with g(x)=h(x)=2 and neither g(x) nor h(x) is a unit in the integer ring. This implies that f(x) is reducible over the ring of integers.
22 is a term as f(x) = B0 + B1*x = 2 + 2*x = 2(1+x) = g(x)*h(x) with g(x)=2 and h(x)=1+x.
110 is a term as f(x) = B0 + B1*x + B2*x^2 = 0 + 1*x + 1*x^2 = x + x^2 = x(1+x) = g(x)*h(x) with g(x)=x and h(x)=1+x.
		

Crossrefs

Cf. A121719.

Programs

  • Mathematica
    okQ[n_] := n<10 && CompositeQ[n] || MatchQ[Factor[(id = IntegerDigits[n]). x^Range[Length[id]-1, 0, -1]][[0]], Times|Power]; Select[Range[250], okQ] (* Jean-François Alcover, Feb 01 2016 *)
  • PARI
    isok(n) = {p = Pol(digits(n)); if (poldegree(p) == 0, return ((n!=1) && !isprime(n))); if (! polisirreducible(p), return (1)); f = factor(p); q = prod(k=1, #f~, f[k,1]^f[k,2]); r = p/q; nr = polcoeff(r, 0); if (nr != 1, return (1));} \\ Michel Marcus, Jan 31 2016
    
  • PARI
    isok(n) = {d = digits(n); p = Pol(d); if (poldegree(p) == 0, return ((n!=1) && !isprime(n))); if (! polisirreducible(p), return (1)); return (gcd(d) != 1);} \\ Michel Marcus, Feb 01 2016

A262721 Modified Look and Say sequence: compute sum of digits of previous term, square it, and apply the "Say What You See" process.

Original entry on oeis.org

1, 11, 14, 1215, 1811, 111211, 1419, 2215, 1120, 1116, 1811, 111211, 1419, 2215, 1120, 1116, 1811, 111211, 1419, 2215, 1120, 1116, 1811, 111211, 1419, 2215, 1120, 1116, 1811, 111211, 1419, 2215, 1120, 1116, 1811, 111211, 1419, 2215, 1120, 1116
Offset: 0

Author

Abdul Gaffar Khan, Sep 28 2015

Keywords

Comments

1. Generated with the help of sequence generated as follows:
c(0)=b, c(n)=k-th power of sum of digits of c(n-1).
Example: c(0)=1, c(n)=1 for all k hence convergent.
Example: c(0)=2, k=2, c(1)=4, c(2)=16, c(3)=49 as (1+6)^2=49.
Example: c(0)=3, k=2, c(n)=81 for all n, hence convergent.
In fact, for c(0)=3 and any k, a sequence generated by using this method converges.
(Methods G, V1 and V2 are explain in Link attached, namely "Generalization of A262721")
2. Every sequence generated by c(0)=b and any k, by using G, V1 or V2 has at least two convergent subsequences or in other words sequence generated by method G, V1 or V2 never converges for any b and k.
(2.1) For a(0)=1, k=2, and method G has 6 convergent subsequences with initial terms 1, 11, 14 and 1215 and converging to 1811, 111211, 1419, 2215, 1120, or 1116.
(2.2) For c(0)=1, k=2, and method V1 has 2 convergent subsequences with initial terms 1, 11, 14, 1215, 1118, 2112 and converging to 1316 and 2112.
(2.3) For c(0)=1, k=2, and method V2 has 2 convergent subsequences with initial terms 1, 11, 14, 15125, 1811, 1221 and converging to 1613 and 1221.
3. For any b and k, the least 'g-th' term of the sequence generated by methods G, V1 or V2 reaches a point at which one of the convergent subsequence of generated sequence,converges. That is, c(g) will be the converging point of one of the subsequence of generated sequence, but there is no subsequence which converges to the term c(m),m=0,...,g-1,with initial term read as c(0).
(3.1) For a(0)=1, k=2, method G we have g=4 with converging point 1811 by refering (2.1).
(3.2) For c(0)=1, k=2, method V1 we have g=5, with converging point 2112.
(3.3) For c(0)=1, k=2, method V2 we have g=5, with converging point 1221.
(3.4) For any b and k, the value of g for methods V1 and V2 is the same.
4. For method G, V1 or V2 with c(0)=b and k chosen randomly, the following holds:
(I) g<=k*23, for b=1 and for k<=100
(II) g<=k*23*b for k<=100
(III) g<=k*(23^(b+1)) for large values of k.
5. In the manner of A083671, sequence become periodic from 5th row with period of 6.

Examples

			a(0) = 1 has 1 digit, and the sum of digits is 1, and the square of the sum of digits is 1. So a(1) = 11, that is, one times 1.
a(1) = 11 has 2 digits, and the sum of digits is 1+1=2 and the square of the sum of digits is 4. So a(2) = 14, that is, one times 4.
Since a(2)=14, we compute 1+4=5, 5^2 = 25, where we see one 2 and one 5, so a(3)=1215.
		

Crossrefs

Cf. A005150 (Look and Say).
Cf. A118881 (square of sum of digits of n).
Cf. A005151 (Summarize the previous term! (in increasing order)).
Cf. A007890 (Summarize the previous term! (in decreasing order)).
Cf. A045918 (Describe n. Also called the "Say What You See" or "Look and Say" sequence LS(n).)

Programs

  • Mathematica
    A262721[0] := 1;
    A262721[n_] :=
    A262721[n] =
      FromDigits[
       Flatten[{Length[#], First[#]} & /@
         Split[IntegerDigits[
           Total[IntegerDigits[A262721[n - 1]]]^2]]]]; Table[
    A262721[n], {n, 0, 100}]
  • PARI
    say(n) = {d = digits(n); da = d[1]; na = 1; s = ""; for (k=2, #d, if (d[k] == da, na++, s = concat(s, Str(na, da)); na = 1; da = d[k]);); s = concat(s, Str(na, da)); eval(s);}
    lista(nn) = {print1(a=1, ", "); for (k=2, nn, a = say(sumdigits(a)^2); print1(a, ", "););} \\ Michel Marcus, Sep 29 2015

Formula

1. a(0) = 1, a(n) = 'frequency' of digits in the square of the sum of digits of a(n-1) followed by 'digit'-indication.
2. a(0) = 1, a(n) = A005150(A118881(a(n-1))). Here first deal with the type of operations of A118881 on a(n-1)-th term and then deal with the operation of A005150 on obtained value from A118881(a(n-1)) in last step, instead of following a(n-1) term of A118881 and A118881(a(n-1)) as a member of sequences A118881 and A005150 respectively.
a(0) = 1, a(n) = A045918(A118881(a(n-1))).

A262154 Pseudoprimes to base 9, written in base 9.

Original entry on oeis.org

4, 8, 31, 57, 111, 144, 247, 347, 444, 627, 651, 754, 825, 854, 861, 1261, 1264, 1371, 1457, 1681, 1811, 2102, 2331, 2531, 3338, 3378, 3581, 3631, 3757, 3774, 4011, 4161, 4445, 4551, 5127, 6002, 6321, 6722, 7311, 7547, 8651, 10044, 10101, 10637, 11111, 11762, 12464, 12831, 12885, 13141, 13201, 15461, 16084, 16451
Offset: 1

Author

Abdul Gaffar Khan, Sep 13 2015

Keywords

Crossrefs

Cf. A007095 (numbers in base 9), A020138 (pseudoprimes to base 9).

Programs

  • Mathematica
    base = 9; t = {}; n = 1;
    While[Length[t] < 80, n++;
    If[! PrimeQ[n] && PowerMod[base, n - 1, n] == 1,
      AppendTo[t, FromDigits@IntegerDigits[n, 9]]]]; t
  • PARI
    lista(nn, b=9) = {for (n=1, nn, if (Mod(b, n)^(n-1)==1 && !ispseudoprime(n) && n>1, print1(subst(Pol(digits(n,b), x), x, 10), ", ");););} \\ Michel Marcus, Sep 30 2015

Formula

a(n) = A007095(A020138(n)).

A262104 Pseudoprimes to base 7, written in base 7.

Original entry on oeis.org

6, 34, 643, 1431, 2023, 2245, 3136, 5215, 6061, 6601, 10121, 12361, 16123, 20032, 25345, 33155, 41545, 42601, 42652, 44122, 45406, 50026, 54561, 56035, 66522, 66666, 105403, 110254, 112612, 113345, 113356, 123616, 135206, 140011, 151142, 151354, 153022, 153101, 153352, 155554
Offset: 1

Author

Abdul Gaffar Khan, Sep 11 2015

Keywords

Crossrefs

Cf. A005938 (pseudoprimes to base 7), A007093 (numbers in base 7).

Programs

  • Mathematica
    base = 7; t = {}; n = 1;
    While[Length[t] < 40, n++;
    If[! PrimeQ[n] && PowerMod[base, n - 1, n] == 1,
      AppendTo[t, FromDigits@IntegerDigits[n, 7]]]]; t
    FromDigits[IntegerDigits[#,7]]&/@Select[Range[40000],CompositeQ[#] && PowerMod[ 7,#-1,#]==1&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Feb 24 2018 *)
  • PARI
    lista(nn, b=7) = {for (n=1, nn, if (Mod(b, n)^(n-1)==1 && !ispseudoprime(n) && n>1, print1(subst(Pol(digits(n,b), x), x, 10), ", ");););} \\ Michel Marcus, Sep 30 2015

Formula

a(n) = A007093(A005938(n)).

A262103 Pseudoprimes to base 6, written in base 6.

Original entry on oeis.org

55, 505, 1001, 1221, 2121, 5041, 5051, 5501, 10101, 12001, 15225, 20301, 21021, 23501, 24301, 24341, 30041, 31031, 32451, 42241, 50125, 50321, 101101, 102421, 105131, 111111, 113425, 121001, 121101, 123041, 123321, 132305, 150135, 152021, 201201, 204445, 212121, 221001, 222401, 232401
Offset: 1

Author

Abdul Gaffar Khan, Sep 11 2015

Keywords

Crossrefs

Cf. A007092 (numbers in base 6), A005937 (pseudoprimes to base 6).

Programs

  • Mathematica
    base = 6; t = {}; n = 1;
    While[Length[t] < 40, n++;
    If[! PrimeQ[n] && PowerMod[base, n - 1, n] == 1,
      AppendTo[t, FromDigits@IntegerDigits[n, 6]]]]; t
  • PARI
    lista(nn, b=6) = {for (n=1, nn, if (Mod(b, n)^(n-1)==1 && !ispseudoprime(n) && n>1, print1(subst(Pol(digits(n,b), x), x, 10), ", ");););} \\ Michel Marcus, Sep 30 2015

Formula

a(n) = A007092(A005937(n)).

A262102 Pseudoprimes to base 5, written in base 5.

Original entry on oeis.org

4, 444, 1332, 4221, 11111, 22131, 23404, 30031, 42241, 112443, 133321, 134421, 140122, 140411, 202401, 214244, 222223, 224104, 241121, 304011, 323131, 331401, 402201, 404041, 411313, 421411, 434411, 1001001, 1001331, 1010142, 1032032, 1140421, 1212131, 1224103, 1233321, 1302302, 1302401, 1414331, 1421124, 1440143
Offset: 1

Author

Abdul Gaffar Khan, Sep 11 2015

Keywords

Crossrefs

Cf. A007091 (numbers in base 5), A005936 (pseudoprimes to base 5).

Programs

  • Mathematica
    base = 5; t = {}; n = 1;
    While[Length[t] < 40, n++;
    If[! PrimeQ[n] && PowerMod[base, n - 1, n] == 1,
      AppendTo[t, FromDigits@IntegerDigits[n, 5]]]]; t
  • PARI
    lista(nn, b=5) = {for (n=1, nn, if (Mod(b, n)^(n-1)==1 && !ispseudoprime(n) && n>1, print1(subst(Pol(digits(n,b), x), x, 10), ", ");););} \\ Michel Marcus, Sep 30 2015

Formula

a(n) = A007091(A005936(n)).

A262101 Pseudoprimes to base 4, written in base 4.

Original entry on oeis.org

33, 1111, 1123, 11111, 12303, 13003, 20301, 22011, 22333, 101101, 103133, 103313, 111223, 120231, 122133, 123001, 131203, 131301, 133333, 200113, 212201, 222031, 230011, 300331, 303031, 310213, 321203, 333001, 1010101, 1010103, 1021021, 1022323, 1023323, 1111111, 1112233, 1213021, 1213303, 1330111, 2002001, 2010201, 2013313, 2023033, 2031211, 2032223
Offset: 1

Author

Abdul Gaffar Khan, Sep 11 2015

Keywords

Crossrefs

Cf. A007090 (numbers in base 4), A020136 (pseudoprimes to base 4).

Programs

  • Mathematica
    BaseForm[Select[Range[4096], Not[PrimeQ[#]] && PowerMod[4, # - 1, #] == 1 &], 4]
  • PARI
    lista(nn, b=4) = {for (n=1, nn, if (Mod(b, n)^(n-1)==1 && !ispseudoprime(n) && n>1, print1(subst(Pol(digits(n,b), x), x, 10), ", ");););} \\ Michel Marcus, Sep 30 2015

Formula

a(n) = A007090(A020136(n)).

A258189 Pseudoprimes to base 3, written in base 3.

Original entry on oeis.org

10101, 11111, 101121, 220212, 222001, 1022011, 1111221, 2010002, 2101001, 2121001, 10101022, 10122201, 10201001, 10212111, 11111112, 11121201, 12010221, 20210202, 21121121, 100001111, 101010101, 102112011, 110020001, 112112001, 120002211, 122000101, 201201201, 202212002
Offset: 1

Author

Abdul Gaffar Khan, Sep 11 2015

Keywords

Crossrefs

Cf. A005935 (pseudoprimes to base 3), A007089 (numbers in base 3).

Programs

  • Mathematica
    base = 3; t = {}; n = 1;
    While[Length[t] < 40, n++;
    If[! PrimeQ[n] && PowerMod[base, n - 1, n] == 1,
      AppendTo[t, FromDigits@IntegerDigits[n, 3]]]]; t
  • PARI
    lista(nn, b=3) = {for (n=1, nn, if (Mod(b, n)^(n-1)==1 && !ispseudoprime(n) && n>1, print1(subst(Pol(digits(n,b), x), x, 10), ", ");););} \\ Michel Marcus, Sep 30 2015

Formula

a(n) = A007089(A005935(n)). - Michel Marcus, Sep 11 2015

Extensions

a(25) corrected by Georg Fischer, Dec 18 2020