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

A075804 Differences between adjacent palindromic nonsquarefree numbers A035132.

Original entry on oeis.org

4, 1, 35, 44, 11, 22, 50, 41, 20, 10, 10, 20, 20, 41, 10, 20, 41, 10, 10, 20, 20, 20, 41, 50, 10, 31, 20, 20, 10, 10, 10, 10, 51, 61, 20, 20, 20, 20, 21, 90, 332, 550, 231, 220, 220, 110, 110, 220, 671, 110, 220, 11, 110, 110, 220, 110, 110, 220, 341, 220, 330, 341
Offset: 1

Views

Author

Jani Melik, Oct 13 2002

Keywords

Examples

			a(1) = 8 - 4 = 4, a(2) = 9 - 8 = 1, a(3) = 44 - 9 = 35.
		

Crossrefs

Programs

  • Maple
    test := proc(n) local d; d := convert(n,base,10); return ListTools[Reverse](d)=d and numtheory[mobius](n)=0; end; s := []; for n from 1 to 7000 do if test(n) then s := [op(s),n]; end; od; a := [op(2..-1,s)-op(1..-2,s)];
  • Mathematica
    Differences[Select[Range[10000],PalindromeQ[#]&&!SquareFreeQ[#]&]] (* Harvey P. Dale, Dec 28 2024 *)

Extensions

Edited by Dean Hickerson, Oct 21 2002

A035133 Cubeful (i.e., not cubefree) palindromes.

Original entry on oeis.org

8, 88, 232, 272, 343, 424, 464, 616, 656, 686, 696, 808, 848, 888, 999, 1331, 2112, 2552, 2662, 2992, 3773, 3993, 4224, 4664, 6336, 6776, 8008, 8448, 8888, 14641, 18981, 19791, 21112, 21312, 21512, 21712, 21912, 23032, 23232, 23432, 23632
Offset: 1

Views

Author

Patrick De Geest, Nov 15 1998

Keywords

Comments

Chourasiya & Johnston show that there are infinitely many palindromes not in this sequence. - Charles R Greathouse IV, May 14 2025

Examples

			E.g., 34643 = 7^3 * 101.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[25000],PalindromeQ[#]&&Max[FactorInteger[#][[;;,2]]]>2&] (* Harvey P. Dale, Feb 18 2024 *)

Formula

A046099 INTERSECT A002113. - R. J. Mathar, Dec 08 2015

A071251 Squarefree palindromes.

Original entry on oeis.org

1, 2, 3, 5, 6, 7, 11, 22, 33, 55, 66, 77, 101, 111, 131, 141, 151, 161, 181, 191, 202, 222, 262, 282, 303, 313, 323, 353, 373, 383, 393, 434, 454, 474, 494, 505, 515, 535, 545, 555, 565, 595, 606, 626, 646, 707, 717, 727, 737, 757, 767, 777, 787, 797, 818, 838
Offset: 1

Views

Author

Amarnath Murthy, May 21 2002

Keywords

Crossrefs

Intersection of A002113 and A005117.

Programs

  • Maple
    ffpal := proc(n) local i,j,k,s,aa,nn,bb,flag; s := n; aa := convert(s,string); nn := length(aa); bb := ``; for i from nn by -1 to 1 do bb := cat(bb,substring(aa,i..i)); od; flag := 0; for j from 1 to nn do if substring(aa,j..j)<>substring(bb,j..j) then flag := 1 fi; od; RETURN(flag); end: ts_ndk_pal := proc(i) if ffpal((i)) = 0 then if (numtheory[issqrfree](i) = 'true' ) then RETURN((i)) fi fi end: andkpal := [seq(ts_ndk_pal(i), i=1..10000)]: andkpal;
  • Mathematica
    Select[ Range[ 1000], # == FromDigits[ Reverse[ IntegerDigits[ # ]]] && Max[ Transpose[ FactorInteger[ # ]] [[2]]] < 2 &]
    Select[Range[1000],PalindromeQ[#]&&SquareFreeQ[#]&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Dec 17 2018 *)

Extensions

Edited by Robert G. Wilson v, Jun 03 2002

A035134 Squarefree composite palindromes.

Original entry on oeis.org

6, 22, 33, 55, 66, 77, 111, 141, 161, 202, 222, 262, 282, 303, 323, 393, 434, 454, 474, 494, 505, 515, 535, 545, 555, 565, 595, 606, 626, 646, 707, 717, 737, 767, 777, 818, 838, 858, 878, 898, 939, 949, 959, 969, 979, 989, 1001, 1111, 1221, 1441, 1551, 1661
Offset: 1

Views

Author

Patrick De Geest, Nov 15 1998

Keywords

Comments

Palindromes with at least two and all distinct prime factors.

Crossrefs

Programs

  • Maple
    N:= 4: # to get all terms with <= N digits
    revdigs:= proc(n) local L, j, nL;
      L:= convert(n, base, 10); nL:= nops(L);
      add(L[j]*10^(nL-j), j=1..nL);
    end proc:
    palis:= $0..9:
    for d from 2 to N do
      if d::even then
        palis:= palis, seq(x*10^(d/2)+revdigs(x), x=10^(d/2-1)..10^(d/2)-1)
      else
        palis:= palis, seq(seq(x*10^((d+1)/2)+y*10^((d-1)/2)+revdigs(x), y=0..9), x=10^((d-3)/2)..10^((d-1)/2)-1);
      fi
    od:
    select(t -> not(isprime(t)) and numtheory:-issqrfree(t), [palis][3..-1]): # Robert Israel, Sep 18 2016
  • Mathematica
    sqfQ[n_]:=Max[Transpose[FactorInteger[n]][[2]]]<=1; palQ[n_]:=FromDigits[Reverse[IntegerDigits[n]]]==n; Select[Range[2,1662],!PrimeQ[#] && sqfQ[#] && palQ[#] &] (* Jayanta Basu, May 12 2013 *)
    Select[Range[2000],PalindromeQ[#]&&SquareFreeQ[#]&&CompositeQ[#]&] (* Harvey P. Dale, Apr 10 2022 *)
  • PARI
    isA002113(n)=n=digits(n);for(i=1, #n\2, if(n[i]!=n[#n+1-i], return(0))); 1;
    is(n) = n>1 && isA002113(n) && issquarefree(n) && !isprime(n) \\ Altug Alkan, Sep 19 2016
    \\ in and output digits as a vector.
    
  • PARI
    nxtA002113(n)={my(d=n); i=(#d+1)\2; while(i&&d[i]==9, d[i]=0; d[#d+1-i]=0; i--); if(i, d[i]++; d[#d+1-i]=d[i], d=vector(#d+1); d[1]=d[#d]=1); d}\\sum(i=1, #d, 10^(#d-i)*d[i])}
    \\ all terms up to n digits
    lista(n) = {my(p = [6],l=List(), sp, i); while(#p <= n, sp = sum(i=1,#p,p[i]*10^(#p-i)); if(issquarefree(sp)&&!isprime(sp), listput(l,sp)); p=nxtA002113(p));l} \\ David A. Corneth, Sep 19 2016
    
  • Python
    from itertools import product
    from sympy import factorint, isprime
    def pals(d, base=10): # all d-digit palindromes
        digits = "".join(str(i) for i in range(base))
        for p in product(digits, repeat=d//2):
            if d > 1 and p[0] == "0": continue
            left = "".join(p); right = left[::-1]
            for mid in [[""], digits][d%2]: yield int(left + mid + right)
    def ok(pal): f = factorint(pal); return len(f)>1 and all(f[p]<2 for p in f)
    print(list(filter(ok, (p for d in range(1, 5) for p in pals(d) if ok(p))))) # Michael S. Branicky, Jun 22 2021

A077572 Nonsquarefree numbers obtained by repeating a single digit.

Original entry on oeis.org

4, 8, 9, 44, 88, 99, 333, 444, 666, 888, 999, 4444, 8888, 9999, 44444, 88888, 99999, 333333, 444444, 666666, 777777, 888888, 999999, 4444444, 8888888, 9999999, 44444444, 88888888, 99999999, 111111111, 222222222, 333333333, 444444444
Offset: 1

Views

Author

Amarnath Murthy, Nov 11 2002

Keywords

Examples

			666 and 111111111 are members but 66, 1111 etc. are not.
		

Crossrefs

Subsequence of A013929 and A035132.

Programs

  • Mathematica
    Select[Flatten[Table[FromDigits[PadRight[{},i,n]],{i,9},{n,9}]],!SquareFreeQ[#]&] (* Harvey P. Dale, Jan 22 2013 *)
  • Python
    from sympy.ntheory.factor_ import core
    def repsthru(maxd):
      yield from (int(di*d) for d in range(1, maxd+1) for di in "123456789")
    def okrep(r): return r > 3 and core(r, 2) != r
    print(list(filter(okrep, repsthru(9)))) # Michael S. Branicky, Apr 08 2021

Extensions

Corrected and extended by Ray Chandler, Aug 12 2003
Offset changed by Andrew Howroyd, Sep 29 2024
Showing 1-5 of 5 results.